Commit d29df8b9 authored by 张伯涛's avatar 张伯涛

修改

parent 2693863d
......@@ -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({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment