| | |
| | | |
| | | // 实名认证 |
| | | function realNameAuthenticationApi(submitData) { |
| | | return $$.request({ url: 'paUser/realAuth', type: 'post', submitData, service: 'cust' }); |
| | | return $$.request({ |
| | | url: 'paUser/realAuth', |
| | | type: 'post', |
| | | submitData, |
| | | service: 'cust' |
| | | }); |
| | | } |
| | | |
| | | Page({ |
| | |
| | | |
| | | // 展示弹出层 |
| | | handleShowPopup(e) { |
| | | this.setData({ popup: e.detail }); |
| | | this.setData({ |
| | | popup: e.detail |
| | | }); |
| | | }, |
| | | |
| | | // 关闭弹出层 |
| | | handleClosePopup() { |
| | | this.data.popup.visible = false; |
| | | this.setData({ popup: this.data.popup }); |
| | | this.setData({ |
| | | popup: this.data.popup |
| | | }); |
| | | }, |
| | | |
| | | // 下拉框确认选择 |
| | | handleConfirmPicker({ detail }) { |
| | | handleConfirmPicker({ |
| | | detail |
| | | }) { |
| | | let type = this.data.popup.type; |
| | | let value = detail.detail.value; |
| | | let arr = []; |
| | |
| | | this.data.submitData[x] = value[t === 0 ? 'value' : 'label']; |
| | | }); |
| | | } |
| | | this.setData({ popup: this.data.popup, submitData: this.data.submitData }); |
| | | this.setData({ |
| | | popup: this.data.popup, |
| | | submitData: this.data.submitData |
| | | }); |
| | | }, |
| | | |
| | | // form的change |
| | | handleChange(e) { |
| | | const { key, value } = e.detail; |
| | | const { |
| | | key, |
| | | value |
| | | } = e.detail; |
| | | this.data.submitData[key] = value; |
| | | this.setData({ submitData: this.data.submitData }); |
| | | this.setData({ |
| | | submitData: this.data.submitData |
| | | }); |
| | | }, |
| | | |
| | | // 修改picker的列时触发 |
| | | handleChangeColumns(e) { |
| | | if (this.data.popup.type === 'location') { |
| | | let selectData = $$.changeLocation(e, this.selectComponent('#personal-data-dom').location, this.data.popup.selectData); |
| | | this.setData({ popup: { ...this.data.popup, selectData } }); |
| | | this.setData({ |
| | | popup: { |
| | | ...this.data.popup, |
| | | selectData |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | msg = '请勾选确认信息'; |
| | | } |
| | | if (msg) { |
| | | $$.showToast({ title: msg }); |
| | | $$.showToast({ |
| | | title: msg |
| | | }); |
| | | return false; |
| | | } |
| | | let that = this; |
| | |
| | | that.realNameAuthentication(); |
| | | }, |
| | | fail() { |
| | | $$.showToast({ title: '抱歉!识别失败,请稍后重试' }); |
| | | $$.showToast({ |
| | | title: '抱歉!识别失败,请稍后重试' |
| | | }); |
| | | }, |
| | | }); |
| | | }, |
| | | fail(res) { |
| | | $$.showToast({ title: '抱歉!请求失败,稍后重试' }); |
| | | $$.showToast({ |
| | | title: '抱歉!请求失败,稍后重试' |
| | | }); |
| | | }, |
| | | }); |
| | | }, |
| | |
| | | wx.getStorage({ |
| | | key: 'userInfo', |
| | | success(res2) { |
| | | res2.data.realStatus = '1'; |
| | | wx.setStorage({ key: 'userInfo', data: res2.data }); |
| | | console.log('res2', res2); |
| | | let nowData = { |
| | | ...res2.data, |
| | | realStatus: 1, |
| | | } |
| | | wx.setStorage({ |
| | | key: 'userInfo', |
| | | data: nowData |
| | | }); |
| | | }, |
| | | }); |
| | | $$.showToast({ icon: 'success', title: '实名认证成功' }); |
| | | $$.showToast({ |
| | | icon: 'success', |
| | | title: '实名认证成功' |
| | | }); |
| | | wx.removeStorage({ |
| | | key: 'access_token' |
| | | }); |
| | |
| | | this.data.submitData[x] = data[x]; |
| | | } |
| | | }); |
| | | this.setData({ submitData: this.data.submitData }); |
| | | this.setData({ |
| | | submitData: this.data.submitData |
| | | }); |
| | | }, |
| | | |
| | | // 获取手机号码 |
| | | async handleGetPhoneNumber(e) { |
| | | let phone = await this.selectComponent('#common-page').handleGetPhoneNumber(e.detail); |
| | | this.data.submitData.mobile = phone; |
| | | this.setData({ submitData: this.data.submitData }); |
| | | this.setData({ |
| | | submitData: this.data.submitData |
| | | }); |
| | | }, |
| | | |
| | | /** |