| | |
| | | } |
| | | this.data.user.userIdcard=e.detail.value |
| | | }, |
| | | getPhoneNumber:function(e){ |
| | | console.log(e); |
| | | |
| | | }, |
| | | submit(){ |
| | | if(!/^[\u4e00-\u9fa5]{2,4}$/.test(this.data.user.realName)){ |
| | | // Toast.fail('请输入正确的姓名'); |
| | |
| | | return |
| | | } |
| | | wx.request({ |
| | | |
| | | url: loginInfo.globalData.url+"/wx/login", |
| | | data: { |
| | | "code": wx.getStorageSync('uesrCode'), |
| | | "phoneNumberCode": wx.getStorageSync('userPhoneNumberCode') |
| | | "phone": wx.getStorageSync('phone'), |
| | | }, |
| | | method: "GET", |
| | | success: (res) => { |
| | |
| | | wx.setStorageSync('id', res.data.data.id) |
| | | wx.setStorageSync('card',res.data.data.time) |
| | | console.log(res.data.data.id) |
| | | this.data.user.id= res.data.data.id |
| | | wx.setStorageSync('id',res.data.data.id) |
| | | wx.request({ |
| | | url:loginInfo.globalData.url+"/wx/user/add", |
| | | method:"POST", |
| | | data:this.data.user, |
| | | header:{ |
| | | 'token':wx.getStorageSync('token') |
| | | }, |
| | | success:(res)=>{ |
| | | wx.setStorageSync('info',true) |
| | | wx.reLaunch({ |
| | | url:'../../user/index' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | wx.request({ |
| | | url:loginInfo.globalData.url+"/wx/user/add", |
| | | method:"POST", |
| | | data:this.data.user, |
| | | header:{ |
| | | 'token':wx.getStorageSync('token') |
| | | }, |
| | | success:(res)=>{ |
| | | wx.setStorageSync('info',true) |
| | | wx.reLaunch({ |
| | | url:'../../user/index' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | face(){ |
| | | wx.chooseMedia({ |