From 62ea84fd7832936c1f7c7a5afb0a2527b4c0563c Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 15 Sep 2025 17:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A7=9F=E8=B5=81=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=AE=9E=E5=90=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/lease/lease.vue | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/pages/lease/lease.vue b/pages/lease/lease.vue index a24c7f6..d718e25 100644 --- a/pages/lease/lease.vue +++ b/pages/lease/lease.vue @@ -186,6 +186,7 @@ import { } from '@/api/lease/lease.js' import { checkLoginStatus } from '../../utils/checkLogin' import { isSignProtocolInstallation } from '../../api/protocol/protocol' +import { getIsRealName } from '../../api' export default { name: 'LeasePage', @@ -224,6 +225,7 @@ export default { }, data() { return { + isRealName: false, isLogin: false, hasAgreed: false, formData: { @@ -440,7 +442,33 @@ export default { uni.$uv.debounce(this.handlePayment, 1000, true) }, - handlePayment() { + async goToRealName() { + const res = await getIsRealName() + if (!res.data) { + uni.showModal({ + title: '提示', + content: '需要租赁,请先实名', + showCancel: true, + confirmText: '去实名', + cancelText: '暂不', + success: function (res) { + if (res.confirm) { + uni.navigateTo({ + url: '/pages/realNameAuthentication/realNameAuthentication', + }) + } + }, + }) + } else { + this.isRealName = true + } + }, + + async handlePayment() { + await this.goToRealName() + if (!this.isRealName) { + return + } this.formData.payAmount = this.payAmount if (checkLoginStatus()) { return