From e97763af57ef8a943c91d23e484cb6a3b877f1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Fri, 30 Aug 2024 10:28:06 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E8=AF=B7=E6=B1=82=E9=A1=BA=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E5=87=8F=E7=9F=ADloading=E6=97=B6=E9=97=B4=202.=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=89=88=E6=9C=AC=E5=B9=B6?= =?UTF-8?q?=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 4 +++- pages/home/home.vue | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/App.vue b/App.vue index 6758c35..233307e 100644 --- a/App.vue +++ b/App.vue @@ -12,7 +12,9 @@ useUserStore().updateLoginStatus(isLogin) }, // 账号信息 - appid: '' + appid: '', + // 小程序版本 + envVersion: '' }, computed: { ...mapState(useBluetoothStore, ['bluetoothStatus']), diff --git a/pages/home/home.vue b/pages/home/home.vue index 62a817f..f086431 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -89,12 +89,13 @@ }) const accountInfo = wx.getAccountInfoSync() getApp().globalData.appid = accountInfo.miniProgram.appId + getApp().globalData.envVersion = accountInfo.miniProgram.envVersion this.deviceInfo = await this.getDeviceInfo() const token = uni.getStorageSync('token') if(token) { + this.getLockList(this.lockSearch) await this.getUserInfo() - await this.getLockList(this.lockSearch) } else { await this.homeLogin() } @@ -121,8 +122,8 @@ uni.setStorageSync('openid', data.openid) if(data.accessToken) { uni.setStorageSync('token', data.accessToken) - that.getUserInfo() that.getLockList(that.lockSearch) + await that.getUserInfo() that.updateLoginStatus(true) resolve(true) } else {