Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
d78f6422
Commit
d78f6422
authored
Aug 05, 2020
by
fungleo
Browse files
Merge remote-tracking branch 'upstream/master'
parents
26dfee2c
b5689885
Changes
1
Hide whitespace changes
Inline
Side-by-side
ruoyi-ui/src/utils/request.js
View file @
d78f6422
...
@@ -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
.
re
load
()
// 为了重新实例化vue-router对象 避免bug
location
.
h
re
f
=
'
/index
'
;
})
})
})
})
}
else
if
(
code
===
500
)
{
}
else
if
(
code
===
500
)
{
...
...
Write
Preview
Supports
Markdown
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