|
|
|
@ -10,7 +10,8 @@ interface UserVO {
|
|
|
|
|
id: number |
|
|
|
|
avatar: string |
|
|
|
|
nickname: string |
|
|
|
|
deptId: number |
|
|
|
|
deptId: number, |
|
|
|
|
realName:string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface UserInfoVO { |
|
|
|
@ -30,7 +31,8 @@ export const useUserStore = defineStore('admin-user', {
|
|
|
|
|
id: 0, |
|
|
|
|
avatar: '', |
|
|
|
|
nickname: '', |
|
|
|
|
deptId: 0 |
|
|
|
|
deptId: 0, |
|
|
|
|
realName: '', |
|
|
|
|
} |
|
|
|
|
}), |
|
|
|
|
getters: { |
|
|
|
@ -56,6 +58,7 @@ export const useUserStore = defineStore('admin-user', {
|
|
|
|
|
let userInfo = wsCache.get(CACHE_KEY.USER) |
|
|
|
|
if (!userInfo) { |
|
|
|
|
userInfo = await getInfo() |
|
|
|
|
console.log(userInfo) |
|
|
|
|
} |
|
|
|
|
this.permissions = userInfo.permissions |
|
|
|
|
this.roles = userInfo.roles |
|
|
|
@ -92,7 +95,8 @@ export const useUserStore = defineStore('admin-user', {
|
|
|
|
|
id: 0, |
|
|
|
|
avatar: '', |
|
|
|
|
nickname: '', |
|
|
|
|
deptId: 0 |
|
|
|
|
deptId: 0, |
|
|
|
|
realName:'' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|