This commit is contained in:
shijingjing
2022-05-16 09:08:45 +08:00
parent 973b3b71a8
commit 48e694662d

View File

@@ -51,18 +51,18 @@ export default {
}, },
confirm() { confirm() {
if(this.isChecked == flase) { if(this.isChecked == flase) {
return this.$toast('请勾选用户服务及隐私协议') return this.$u.toast('请勾选用户服务及隐私协议')
} }
let {name, idNumber} = this let {name, idNumber} = this
if (!name) { if (!name) {
return this.$toast('请填写姓名') return this.$u.toast('请填写姓名')
} }
if (!idNumber) { if (!idNumber) {
return this.$toast('请填写身份证号码') return this.$u.toast('请填写身份证号码')
} }
if (!this.$idCardNoUtil.checkIdCardNo(idNumber)) { if (!this.$idCardNoUtil.checkIdCardNo(idNumber)) {
return this.$toast('请输入正确的身份证号码') return this.$u.toast('请输入正确的身份证号码')
} }
this.$instance.post(`/app/appwechatuser/idNumberAttestation`, { this.$instance.post(`/app/appwechatuser/idNumberAttestation`, {
idNumber, name idNumber, name
@@ -81,13 +81,13 @@ export default {
uni.redirectTo({url: "./authSuccess"}) uni.redirectTo({url: "./authSuccess"})
} }
} else { } else {
this.$toast(res.msg); this.$u.toast(res.msg);
setTimeout(() => { setTimeout(() => {
uni.navigateBack(); uni.navigateBack();
}, 500) }, 500)
} }
}).catch(err => { }).catch(err => {
this.$toast(err) this.$u.toast(err)
}) })
}, },
} }