| | |
| | | import { formatTime } from 'miniprogram/utils/util'; |
| | | Page({ |
| | | data: { |
| | | phoneDisab:true, |
| | | isInGroup:'', |
| | | remarks: '', |
| | | addFig:false, |
| | |
| | | getuserIdCard(e) { |
| | | this.setData({ |
| | | userIdCard: e.detail |
| | | }) |
| | | }, |
| | | getuserPhone(e){ |
| | | this.setData({ |
| | | phone: e.detail |
| | | }) |
| | | }, |
| | | getLocation(e) { |
| | |
| | | // }) |
| | | // return |
| | | // } |
| | | if (wx.getStorageSync('role')==1) { |
| | | wx.request( |
| | | { |
| | | url: submitReport.globalData.url + "/wx/user/policeAddReport", |
| | | method: this.data.addFig?"PUT":"POST", |
| | | data: this.data.reportDetail, |
| | | header: { |
| | | 'token': wx.getStorageSync('token'), |
| | | 'content-type': 'application/json' |
| | | }, success: (res) => { |
| | | wx.reLaunch({ |
| | | url: '../../report/index' |
| | | }) |
| | | } |
| | | }) |
| | | }else{ |
| | | wx.request( |
| | | { |
| | | url: submitReport.globalData.url + "/wx/user/addReport", |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | onLoad:function(e) { |
| | | console.log(e); |
| | | let that = this |
| | | let role = wx.getStorageSync('role') |
| | | if (role==1) { |
| | | that.setData({ |
| | | phoneDisab :false |
| | | }) |
| | | } |
| | | let phone = wx.getStorageSync('phone') |
| | | that.setData({ |
| | | phone: phone |