This commit is contained in:
zk
2024-09-23 16:43:57 +08:00
parent ca4a9a8c28
commit 278e91c262
26 changed files with 376 additions and 45 deletions
+8
View File
@@ -20,6 +20,7 @@ export const useUserStore = defineStore({
flag1: '', //银川权限标识
flag2: '', //西安权限标识
centerId: '', //中心点id
centerInfo: null, //应急中心信息
}),
getters: {
getUserInfo(): UserInfo {
@@ -43,6 +44,9 @@ export const useUserStore = defineStore({
getCenterId(): string {
return this.centerId || getAuthCache('centerId');
},
getCenterInfo(): any {
return this.centerInfo || getAuthCache('centerInfo');
},
},
actions: {
setToken(info: string | undefined) {
@@ -72,6 +76,10 @@ export const useUserStore = defineStore({
this.centerId = info ? info : '';
setAuthCache('centerId', info);
},
setCenterInfo(info: any) {
this.centerInfo = info;
setAuthCache('centerInfo', info);
},
/**
* 登录事件
*/