fix
This commit is contained in:
+1
-6
@@ -76,21 +76,16 @@ App<IAppOption>({
|
||||
},
|
||||
checkLoginState() {
|
||||
const openId = wx.getStorageSync('openId');
|
||||
const unionId = wx.getStorageSync('unionId');
|
||||
const userId = wx.getStorageSync('userId');
|
||||
|
||||
const isLoggedIn = !!(openId && unionId && userId);
|
||||
|
||||
const isLoggedIn = !!(openId && userId);
|
||||
if (!isLoggedIn) {
|
||||
// 清理登录相关缓存
|
||||
LOGIN_STORAGE_KEYS.forEach(key => wx.removeStorageSync(key));
|
||||
}
|
||||
|
||||
// 记录上一次登录状态,用于判断是否从已登录变为未登录
|
||||
const prev = this.globalData.isLogin;
|
||||
this.globalData.isLogin = isLoggedIn;
|
||||
this.globalData.wasLogin = prev;
|
||||
|
||||
return isLoggedIn;
|
||||
},
|
||||
login(value: string) {
|
||||
|
||||
Reference in New Issue
Block a user