Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Administrator
web-monitor
Commits
f4514a66
Commit
f4514a66
authored
Apr 18, 2018
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix[permission]: set NProgress.done #79
parent
6fa3f104
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
permission.js
src/permission.js
+1
-0
No files found.
src/permission.js
View file @
f4514a66
...
@@ -11,6 +11,7 @@ router.beforeEach((to, from, next) => {
...
@@ -11,6 +11,7 @@ router.beforeEach((to, from, next) => {
if
(
getToken
())
{
if
(
getToken
())
{
if
(
to
.
path
===
'/login'
)
{
if
(
to
.
path
===
'/login'
)
{
next
({
path
:
'/'
})
next
({
path
:
'/'
})
NProgress
.
done
()
// if current page is dashboard will not trigger afterEach hook, so manually handle it
}
else
{
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
store
.
dispatch
(
'GetInfo'
).
then
(
res
=>
{
// 拉取用户信息
store
.
dispatch
(
'GetInfo'
).
then
(
res
=>
{
// 拉取用户信息
...
...
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