diff --git a/pages/selfService/realName/realName.vue b/pages/selfService/realName/realName.vue index 8f43088..19fb8e5 100644 --- a/pages/selfService/realName/realName.vue +++ b/pages/selfService/realName/realName.vue @@ -1,19 +1,19 @@ @@ -262,7 +301,7 @@ export default { idBack: '', idName: '身份证', idType: 1, - sex:1 + sex: 1, }, sexRadio: 1, address: '', @@ -413,7 +452,7 @@ export default { this.agreeMent = true }, getDetail() { - ban.authenticationDetails().then((res) => { + ban.authenticationDetails().then(res => { if (res.data) { this.hasRegin = true } else { @@ -421,24 +460,13 @@ export default { } }) }, - toCheck(e) { - if (this.isRead == 0) { - this.$nextTick(() => { - this.$set(this, 'agreementShow', []) - uni.showToast({ - title: '请阅读推广人员服务协议', - icon: 'none', - duration: 1500, - }) - }) - } - }, + getIdCardInfo(n) { ban .ocrIdCard({ idCardUrl: n, }) - .then((res) => { + .then(res => { if (res.code == 200) { this.$set(this.dataForm, 'accountName', res.data.name) this.$set(this.dataForm, 'idCard', res.data.idCard) @@ -460,7 +488,7 @@ export default { .ocrIdCardBack({ idCardBackUrl: e, }) - .then((res) => { + .then(res => { if (res.code == 200) { } else { this.$nextTick(() => { @@ -510,7 +538,7 @@ export default { .getVerification({ phone: this.dataForm.phone, }) - .then((res) => { + .then(res => { uni.hideLoading() // 这里此提示会被this.start()方法中的提示覆盖 uni.$u.toast('验证码已发送') @@ -528,45 +556,37 @@ export default { end() {}, start() {}, getList() { - ban.getBankCardChoiceList().then((res) => { + ban.getBankCardChoiceList().then(res => { this.bankCardChioceList = [res.data] }) //证件类型 - ban.getCardType().then((res) => { + ban.getCardType().then(res => { this.cardTypeList = [res.data] }) }, submit() { - if (this.agreementShow.length == 0) { - uni.showToast({ - title: '请阅读推广人员服务协议', - icon: 'none', - duration: 1500, + this.$refs.uForm + .validate() + .then(res => { + ban + .addAuthentication(this.dataForm) + .then(res => { + if (res.code == 200) { + uni.$u.toast(res.msg) + setTimeout(() => { + uni.navigateBack() + }, 1500) + } else { + uni.$u.toast(res.msg) + } + }) + .catch(err => {}) + }) + .catch(errors => { + uni.$u.toast('校验失败') + return false }) - } else { - this.$refs.uForm - .validate() - .then((res) => { - ban - .addAuthentication(this.dataForm) - .then((res) => { - if (res.code == 200) { - uni.$u.toast(res.msg) - setTimeout(() => { - uni.navigateBack() - }, 1500) - } else { - uni.$u.toast(res.msg) - } - }) - .catch((err) => {}) - }) - .catch((errors) => { - uni.$u.toast('校验失败') - return false - }) - } }, confirm2(e) { this.dataForm.idName = e.value[0].label @@ -590,7 +610,8 @@ export default { } .content { - background: #f2f2f2; + padding: 0 20rpx; + background: #fff; .uni-textarea { height: 100rpx; @@ -676,4 +697,4 @@ export default { .disflx { margin-top: 10px; } - \ No newline at end of file +