From 6aa1bcf2b2ebd6c709cd60a05fb6dc4534c0762c Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期三, 07 八月 2024 13:34:36 +0800
Subject: [PATCH] 会话联调
---
src/store/modules/user/index.ts | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts
index c77c21a..0849edf 100644
--- a/src/store/modules/user/index.ts
+++ b/src/store/modules/user/index.ts
@@ -5,7 +5,7 @@
getUserInfo,
LoginData,
} from '@/api/user';
-import { setToken, clearToken,setUserInfo } from '@/utils/auth';
+import { setToken, clearToken, setUserInfo, setUserResources, clearUserResources } from "@/utils/auth";
import { removeRouteListener } from '@/utils/route-listener';
import { UserState } from './types';
import useAppStore from '../app';
@@ -28,6 +28,7 @@
accountId: undefined,
certification: undefined,
role: '',
+ resources:undefined,
}),
getters: {
@@ -50,6 +51,7 @@
// Reset user's information
resetInfo() {
+ clearUserResources()
this.$reset();
},
@@ -70,7 +72,9 @@
name: res.data.nickname,
email: res.data.email,
};
+ this.resources=res.data.resources;
setUserInfo(JSON.stringify(userInfo));
+ setUserResources(JSON.stringify(this.resources))
} catch (err) {
clearToken();
throw err;
--
Gitblit v1.8.0