Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_vue_manage
Project
Project
Details
Activity
Releases
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
杨硕
91isoft_vue_manage
Commits
d29df8b9
Commit
d29df8b9
authored
May 13, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
2693863d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
12 deletions
+16
-12
request.js
src/utils/request.js
+16
-12
No files found.
src/utils/request.js
View file @
d29df8b9
...
...
@@ -84,19 +84,23 @@ service.interceptors.response.use(res => {
})
}
if
(
code
===
401
)
{
MessageBox
.
confirm
(
'登录状态已过期,您可以继续留在该页面,或者重新登录'
,
'系统提示'
,
{
confirmButtonText
:
'重新登录'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(()
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
Message
({
message
:
'用户不存在或密码错误'
,
type
:
'error'
})
// MessageBox.confirm(
// '登录状态已过期,您可以继续留在该页面,或者重新登录',
// '系统提示',
// {
// confirmButtonText: '重新登录',
// cancelButtonText: '取消',
// type: 'warning'
// }
// ).then(() => {
// store.dispatch('LogOut').then(() => {
// location.reload() // 为了重新实例化vue-router对象 避免bug
// })
// })
}
else
if
(
code
===
500
||
code
===
400
)
{
const
errMsg
=
res
.
data
.
data
||
res
.
data
.
message
||
res
.
data
.
msg
Message
({
...
...
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