|
|
@@ -63,17 +63,17 @@ service.interceptors.response.use(res => { |
|
|
|
if (code === 401) { |
|
|
|
console.log(this.$route.path) |
|
|
|
|
|
|
|
// Dialog.confirm({ |
|
|
|
// title: '系统提示', |
|
|
|
// message: '登录状态已过期,您可以继续留在该页面,或者重新登录', |
|
|
|
// confirmButtonText: '重新登录', |
|
|
|
// cancelButtonText: '取消' |
|
|
|
// }) |
|
|
|
// .then(() => { |
|
|
|
// store.dispatch('LogOut').then(() => { |
|
|
|
// location.href = '/index'; |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
Dialog.confirm({ |
|
|
|
title: '系统提示', |
|
|
|
message: '登录状态已过期,您可以继续留在该页面,或者重新登录', |
|
|
|
confirmButtonText: '重新登录', |
|
|
|
cancelButtonText: '取消' |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
store.dispatch('LogOut').then(() => { |
|
|
|
location.href = '/index'; |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (code === 500) { |
|
|
|
Dialog.alert({ type: 'warning', message: msg }); |
|
|
|
return Promise.reject(new Error(msg)) |
|
|
|