1. 优化首页列表请求顺序,减短loading时间
2. 获取小程序版本并保存
This commit is contained in:
parent
01950eaf33
commit
e97763af57
4
App.vue
4
App.vue
@ -12,7 +12,9 @@
|
||||
useUserStore().updateLoginStatus(isLogin)
|
||||
},
|
||||
// 账号信息
|
||||
appid: ''
|
||||
appid: '',
|
||||
// 小程序版本
|
||||
envVersion: ''
|
||||
},
|
||||
computed: {
|
||||
...mapState(useBluetoothStore, ['bluetoothStatus']),
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user