Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
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
QA
qa-platform-ui
Commits
0e6583f5
Commit
0e6583f5
authored
Jul 06, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂时修改下逻辑
parent
867ac68b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
index.js
src/router/index.js
+8
-9
No files found.
src/router/index.js
View file @
0e6583f5
...
@@ -212,20 +212,19 @@ const router = new Router({
...
@@ -212,20 +212,19 @@ const router = new Router({
]
]
})
})
// 判断用户是否登陆到系统
// 判断用户是否登陆到系统
router
.
beforeEach
(
function
(
to
,
from
,
next
)
{
router
.
beforeEach
(
function
(
to
,
from
,
next
)
{
var
token
=
window
.
sessionStorage
.
getItem
(
'
token
'
)
var
token
=
window
.
sessionStorage
.
getItem
(
'
token
'
)
if
(
token
!==
null
)
{
if
(
token
!==
null
)
{
if
(
to
.
path
===
'
/login
'
)
{
if
(
to
.
path
===
'
/login
'
)
{
next
(
'
/main
'
)
next
(
'
/main
'
)
}
else
if
(
to
.
path
===
'
/main
'
)
{
next
()
}
else
{
}
else
{
var
menuList
=
window
.
sessionStorage
.
getItem
(
'
menuList
'
)
// var menuList = window.sessionStorage.getItem('menuList')
if
(
menuList
.
indexOf
(
to
.
path
)
>
-
1
)
{
// if (menuList.indexOf(to.path) > -1) {
// next()
// } else {
// next('/main')
// }
next
()
next
()
}
else
{
next
(
'
/main
'
)
}
}
}
}
else
{
}
else
{
if
(
to
.
path
===
'
/login
'
)
{
if
(
to
.
path
===
'
/login
'
)
{
...
...
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