Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
file
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
vanke
file
Commits
26ed68f6
Commit
26ed68f6
authored
Jul 10, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改token,login页面布局
parent
6bb753ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
request.js
src/utils/request.js
+5
-10
No files found.
src/utils/request.js
View file @
26ed68f6
...
@@ -46,16 +46,11 @@ service.interceptors.response.use(
...
@@ -46,16 +46,11 @@ service.interceptors.response.use(
})
})
// 401:未登录;
// 401:未登录;
if
(
res
.
code
===
401
)
{
if
(
res
.
code
===
401
)
{
MessageBox
.
confirm
(
'你已被登出,可以取消继续留在该页面,或者重新登录'
,
'确定登出'
,
{
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
confirmButtonText
:
'重新登录'
,
console
.
log
(
'重新登录'
,
router
)
cancelButtonText
:
'取消'
,
router
.
replace
({
type
:
'warning'
name
:
'login'
,
}).
then
(()
=>
{
query
:
{
redirect
:
router
.
currentRoute
.
fullPath
}
// 登录后再跳回此页面时要做的配置
store
.
dispatch
(
'FedLogOut'
).
then
(()
=>
{
console
.
log
(
'重新登录'
,
router
)
router
.
replace
({
name
:
'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