Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
015a0fbf
authored
2023-02-20 15:45:52 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:字典
1 parent
35bbb8a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
src/permission.js
src/permission.js
View file @
015a0fb
...
...
@@ -24,10 +24,6 @@ router.beforeEach(async (to, from, next) => {
if
(
!
hasUser
)
{
store
.
dispatch
(
"user/getUserInfo"
);
}
//加载字典
if
(
!
hasAddDict
)
{
store
.
dispatch
(
"dict/generateDic"
);
}
if
(
hasAddRoute
)
{
next
();
}
else
{
...
...
@@ -42,6 +38,9 @@ router.beforeEach(async (to, from, next) => {
{
path
:
"*"
,
redirect
:
"/404"
,
hidden
:
true
},
]);
const
routeTo
=
Cookies
.
get
(
"routerTo"
);
if
(
!
hasAddDict
)
{
await
store
.
dispatch
(
"dict/generateDic"
);
}
if
(
routeTo
&&
routeTo
!==
"/"
)
{
next
({
...
to
,
replace
:
true
});
}
else
{
...
...
Please
register
or
sign in
to post a comment