登录时,直接从用户信息中,获取菜单。目的:加快首页的加载速度

This commit is contained in:
YunaiV
2023-07-29 09:28:45 +08:00
parent 40a93caf89
commit ee802d6335
3 changed files with 2 additions and 9 deletions

View File

@ -58,6 +58,7 @@ export const useUserStore = defineStore('admin-user', {
this.user = userInfo.user
this.isSetUser = true
wsCache.set(CACHE_KEY.USER, userInfo)
wsCache.set(CACHE_KEY.ROLE_ROUTERS, userInfo.menus)
},
async loginOut() {
await loginOut()