From 3ca6a204341d797a2b1c92473838486ff1f1aaa8 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Sat, 13 Sep 2025 15:18:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8B=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=9C=AA=E8=83=BD=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/lease/lease.vue | 15 ++++++++++++++- utils/request.js | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/pages/lease/lease.vue b/pages/lease/lease.vue index ffb3117..cdba31c 100644 --- a/pages/lease/lease.vue +++ b/pages/lease/lease.vue @@ -99,7 +99,7 @@ {{ `立即支付 ¥${payAmount}` }} - + @@ -202,6 +202,7 @@ export default { }, }, onShow() { + this.refreshLogin() this.getIsSignProtocolInstallationOnshow() // if (!this.hasAgreed) { // uni.navigateTo({ @@ -223,6 +224,7 @@ export default { }, data() { return { + isLogin: false, hasAgreed: false, formData: { quantity: 1, @@ -247,7 +249,15 @@ export default { } }, methods: { + refreshLogin() { + if (uni.getStorageSync('token')) { + this.isLogin = true + } + }, async getIsSignProtocolInstallationOnshow() { + if (!uni.getStorageSync('token')) { + return + } let res = await isSignProtocolInstallation() console.log('res', res) console.log('res.data', res.data) @@ -256,6 +266,9 @@ export default { }, async getIsSignProtocolInstallation() { + if (!uni.getStorageSync('token')) { + return + } let res = await isSignProtocolInstallation() console.log('res', res) console.log('res.data', res.data) diff --git a/utils/request.js b/utils/request.js index 67de54b..f218632 100644 --- a/utils/request.js +++ b/utils/request.js @@ -20,7 +20,7 @@ const ENV_CONFIG = { // 正式版 // baseUrl: 'https://chu.chuangtewl.com/prod-api', // baseUrl: 'http://192.168.2.21:4601', - baseUrl: 'https://chu.chuangtewl.com/prod-api', + baseUrl: 'http://192.168.2.21:4601', appId: 1, }, }