Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
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
finance-oa
finance-manage
Commits
b5689885
Commit
b5689885
authored
Aug 05, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超时登录后页面跳转到首页
parent
21d07c1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
ruoyi-ui/src/utils/request.js
ruoyi-ui/src/utils/request.js
+2
-5
No files found.
ruoyi-ui/src/utils/request.js
View file @
b5689885
...
@@ -32,17 +32,14 @@ service.interceptors.response.use(res => {
...
@@ -32,17 +32,14 @@ service.interceptors.response.use(res => {
// 获取错误信息
// 获取错误信息
const
msg
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'
default
'
]
const
msg
=
errorCode
[
code
]
||
res
.
data
.
msg
||
errorCode
[
'
default
'
]
if
(
code
===
401
)
{
if
(
code
===
401
)
{
MessageBox
.
confirm
(
MessageBox
.
confirm
(
'
登录状态已过期,您可以继续留在该页面,或者重新登录
'
,
'
系统提示
'
,
{
'
登录状态已过期,您可以继续留在该页面,或者重新登录
'
,
'
系统提示
'
,
{
confirmButtonText
:
'
重新登录
'
,
confirmButtonText
:
'
重新登录
'
,
cancelButtonText
:
'
取消
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
type
:
'
warning
'
}
}
).
then
(()
=>
{
).
then
(()
=>
{
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
location
.
href
=
'
/index
'
;
})
})
})
})
}
else
if
(
code
===
500
)
{
}
else
if
(
code
===
500
)
{
...
...
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