Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
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
tianzhuanghu
ant-design-pro-vue
Commits
cdb1ac7c
Commit
cdb1ac7c
authored
Dec 15, 2018
by
musnow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update interceptor white list
parent
5896b1d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
permission.js
src/permission.js
+2
-2
No files found.
src/permission.js
View file @
cdb1ac7c
...
@@ -9,7 +9,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
...
@@ -9,7 +9,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
NProgress
.
configure
({
showSpinner
:
false
})
// NProgress Configuration
NProgress
.
configure
({
showSpinner
:
false
})
// NProgress Configuration
const
whiteList
=
[
'
/user/login'
,
'/user/register'
,
'/user/register-r
esult'
]
// no redirect whitelist
const
whiteList
=
[
'
login'
,
'register'
,
'registerR
esult'
]
// no redirect whitelist
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
NProgress
.
start
()
// start progress bar
NProgress
.
start
()
// start progress bar
...
@@ -53,7 +53,7 @@ router.beforeEach((to, from, next) => {
...
@@ -53,7 +53,7 @@ router.beforeEach((to, from, next) => {
}
}
}
}
}
else
{
}
else
{
if
(
whiteList
.
in
dexOf
(
to
.
path
)
!==
-
1
)
{
if
(
whiteList
.
in
cludes
(
to
.
name
)
)
{
// 在免登录白名单,直接进入
// 在免登录白名单,直接进入
next
()
next
()
}
else
{
}
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