This commit is contained in:
qsh
2024-08-20 15:30:28 +08:00
parent 347069dbee
commit 31f3df9932
2 changed files with 27 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ export const useUserStore = defineStore('admin-user', {
return null
}
let userInfo = cache.local.get(CACHE_KEY.USER)
if (!userInfo) {
if (!userInfo || !userInfo?.menus || userInfo.menus.length == 0) {
userInfo = await getInfo({})
}
this.permissions = userInfo.permissions