Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
f695bd72
Commit
f695bd72
authored
Jun 19, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改全局路由守卫
parent
f4d73834
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
base-manager-ui/admin/src/router/guards.js
base-manager-ui/admin/src/router/guards.js
+4
-2
No files found.
base-manager-ui/admin/src/router/guards.js
View file @
f695bd72
...
...
@@ -2,7 +2,8 @@ import { hasAuthority } from "@/utils/authority-utils";
// import {loginIgnore} from '@/router/index'
// import {checkAuthorization} from '@/utils/request'
import
NProgress
from
"
nprogress
"
;
import
local
from
"
@/utils/local
"
;
// import local from "@/utils/local";
import
store
from
"
@/store/index
"
;
NProgress
.
configure
({
showSpinner
:
false
});
...
...
@@ -28,7 +29,8 @@ const progressStart = (to, from, next) => {
* @param options
*/
const
loginGuard
=
(
to
,
from
,
next
)
=>
{
let
token
=
local
.
getLocal
(
"
token
"
)
?
true
:
false
;
// let token = local.getLocal("token") ? true : false;
let
token
=
store
.
getters
[
"
site/token
"
];
if
(
token
)
{
next
();
}
else
{
...
...
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