修复bug
This commit is contained in:
@@ -148,8 +148,16 @@
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
let lastUserIdMy = ''
|
||||
onShow(() =>{
|
||||
getUserInfoData()
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) return
|
||||
const currentUserId = uni.getStorageSync('userId') || ''
|
||||
// 仅登录状态变化时刷新,切后台回来直接用缓存
|
||||
if (currentUserId !== lastUserIdMy) {
|
||||
lastUserIdMy = currentUserId
|
||||
getUserInfoData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user