| | |
| | | import { formatTime } from 'miniprogram/utils/util'; |
| | | Page({ |
| | | data: { |
| | | phoneDisab:true, |
| | | isInGroup:'', |
| | | remarks: '', |
| | | addFig:false, |
| | |
| | | ], |
| | | sexId: 0 |
| | | }, |
| | | afterRadeDel(e){ |
| | | console.log(e); |
| | | console.log(this.data.cardIdList); |
| | | let arr=this.data.cardIdList |
| | | arr.splice(e.detail.index,1) |
| | | this.setData({ |
| | | cardIdList: arr |
| | | }) |
| | | }, |
| | | afterRadeDelFile(e){ |
| | | let arr=this.data.fileImgList |
| | | arr.splice(e.detail.index,1) |
| | | this.setData({ |
| | | fileImgList: arr |
| | | }) |
| | | }, |
| | | afterRadeDelTran(e){ |
| | | let arr=this.data.transactionReceiptList |
| | | arr.splice(e.detail.index,1) |
| | | this.setData({ |
| | | transactionReceiptList: arr |
| | | }) |
| | | }, |
| | | afterRadeDelOther(e){ |
| | | let arr=this.data.otherList |
| | | arr.splice(e.detail.index,1) |
| | | this.setData({ |
| | | otherList: arr |
| | | }) |
| | | }, |
| | | getrealName(e) { |
| | | this.setData({ |
| | | realName: e.detail |
| | |
| | | getuserIdCard(e) { |
| | | this.setData({ |
| | | userIdCard: e.detail |
| | | }) |
| | | }, |
| | | getuserPhone(e){ |
| | | this.setData({ |
| | | phone: e.detail |
| | | }) |
| | | }, |
| | | getLocation(e) { |
| | |
| | | if (this.data.fileImgList.length != 0 || this.data.transactionReceiptList.length != 0 || this.data.otherList.length != 0) { |
| | | |
| | | } else { |
| | | Toast('相关合同,交易凭证,其他;必填一项!'); |
| | | Toast('相关合同、交易凭证、其他;必填一项!'); |
| | | return |
| | | } |
| | | this.data.materials = this.data.materials.substring(0, this.data.materials.length - 1); |
| | |
| | | // }) |
| | | // 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 |
| | |
| | | } |
| | | }):[] |
| | | }) |
| | | console.log(this.data.cardIdList); |
| | | |
| | | } |
| | | }) |
| | | |