mirror of
https://github.com/1024-lab/smart-admin.git
synced 2026-06-02 03:55:59 +00:00
v3.12【新增】标签页Chome模式;【优化】优化很多细节
This commit is contained in:
@@ -61,13 +61,19 @@ export const useUserStore = defineStore({
|
||||
logout() {
|
||||
this.token = null;
|
||||
this.setUserLoginInfo(defaultUserInfo);
|
||||
console.log(333,USER_TOKEN);
|
||||
uni.removeStorage(USER_TOKEN);
|
||||
},
|
||||
clearUserLoginInfo() {
|
||||
this.setUserLoginInfo(defaultUserInfo);
|
||||
console.log(444,USER_TOKEN);
|
||||
uni.removeStorage(USER_TOKEN);
|
||||
},
|
||||
async getLoginInfo() {
|
||||
let token = uni.getStorageSync(USER_TOKEN);
|
||||
if(!token){
|
||||
return;
|
||||
}
|
||||
let res = await loginApi.getLoginInfo();
|
||||
this.setUserLoginInfo(res.data);
|
||||
},
|
||||
@@ -99,7 +105,9 @@ export const useUserStore = defineStore({
|
||||
uni.setStorageSync(USER_TOKEN, data.token);
|
||||
|
||||
// 获取用户未读消息
|
||||
this.queryUnreadMessageCount();
|
||||
if(this.token){
|
||||
this.queryUnreadMessageCount();
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user