This commit is contained in:
zk
2024-10-09 09:39:50 +08:00
parent b525fc08eb
commit f3ca399b85
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -19,6 +19,7 @@ export const useUserStore = defineStore({
themeType: '', // dark 1, light 2
flag1: '', //银川权限标识
flag2: '', //西安权限标识
flag3: '', //新版大屏标识
centerId: '', //中心点id
centerInfo: null, //应急中心信息
}),
@@ -41,6 +42,9 @@ export const useUserStore = defineStore({
getFlag2(): string {
return this.flag2 || getAuthCache('flag2');
},
getFlag3(): string {
return this.flag3 || getAuthCache('flag3');
},
getCenterId(): string {
return this.centerId || getAuthCache('centerId');
},
@@ -72,6 +76,10 @@ export const useUserStore = defineStore({
this.flag2 = info ? info : '';
setAuthCache('flag2', info);
},
setFlag3(info: string | undefined) {
this.flag3 = info ? info : '';
setAuthCache('flag3', info);
},
setCenterId(info: string | undefined) {
this.centerId = info ? info : '';
setAuthCache('centerId', info);
+1
View File
@@ -206,6 +206,7 @@
// console.log('flag3', flag3);
userStore.setFlag1(flag1 || '');
userStore.setFlag2(flag2 || '');
userStore.setFlag3(flag3 || '');
// debugger;
if (!flag1 && !flag2 && !flag3) {
userStore.setToken('');