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 {