Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
66a062cf
authored
Apr 29, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reactor:【全局】刷新时,主动加载最新菜单数据
parent
bc6fadca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/store/modules/user.ts
+5
-0
No files found.
src/store/modules/user.ts
View file @
66a062cf
...
@@ -56,6 +56,11 @@ export const useUserStore = defineStore('admin-user', {
...
@@ -56,6 +56,11 @@ export const useUserStore = defineStore('admin-user', {
let
userInfo
=
wsCache
.
get
(
CACHE_KEY
.
USER
)
let
userInfo
=
wsCache
.
get
(
CACHE_KEY
.
USER
)
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
userInfo
=
await
getInfo
()
userInfo
=
await
getInfo
()
}
else
{
// 特殊:在有缓存的情况下,进行加载。但是即使加载失败,也不影响后续的操作,保证可以进入系统
try
{
userInfo
=
await
getInfo
()
}
catch
(
error
)
{}
}
}
this
.
permissions
=
new
Set
(
userInfo
.
permissions
)
this
.
permissions
=
new
Set
(
userInfo
.
permissions
)
this
.
roles
=
userInfo
.
roles
this
.
roles
=
userInfo
.
roles
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment