Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
6a882059
Commit
6a882059
authored
Apr 24, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ensure that the 401 jumps to the login page correctly, fix #512
parent
b7ea68e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
permission.ts
src/store/modules/permission.ts
+5
-2
No files found.
src/store/modules/permission.ts
View file @
6a882059
...
@@ -117,14 +117,17 @@ export const usePermissionStore = defineStore({
...
@@ -117,14 +117,17 @@ export const usePermissionStore = defineStore({
// !Simulate to obtain permission codes from the background,
// !Simulate to obtain permission codes from the background,
// this function may only need to be executed once, and the actual project can be put at the right time by itself
// this function may only need to be executed once, and the actual project can be put at the right time by itself
let
routeList
:
AppRouteRecordRaw
[]
=
[];
try
{
try
{
this
.
changePermissionCode
(
'
1
'
);
this
.
changePermissionCode
(
'
1
'
);
}
catch
(
error
)
{}
routeList
=
(
await
getMenuListById
({
id
:
paramId
}))
as
AppRouteRecordRaw
[];
}
catch
(
error
)
{
console
.
error
(
error
);
}
if
(
!
paramId
)
{
if
(
!
paramId
)
{
throw
new
Error
(
'
paramId is undefined!
'
);
throw
new
Error
(
'
paramId is undefined!
'
);
}
}
let
routeList
=
(
await
getMenuListById
({
id
:
paramId
}))
as
AppRouteRecordRaw
[];
// Dynamically introduce components
// Dynamically introduce components
routeList
=
transformObjToRoute
(
routeList
);
routeList
=
transformObjToRoute
(
routeList
);
...
...
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