修改禅道已知问题
This commit is contained in:
@@ -72,14 +72,36 @@ const err = (error) => {
|
||||
notification.error({ message: '系统提示', description: '网络超时' })
|
||||
break
|
||||
case 401:
|
||||
notification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 })
|
||||
if (token) {
|
||||
store.dispatch('Logout').then(() => {
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
}, 1500)
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
okText: '重新登录',
|
||||
mask: false,
|
||||
onOk: () => {
|
||||
store.dispatch('Logout').then(() => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
try {
|
||||
let path = window.document.location.pathname
|
||||
console.log('location pathname -> ' + path)
|
||||
if (path != '/' && path.indexOf('/user/login') == -1) {
|
||||
window.location.reload()
|
||||
}
|
||||
} catch (e) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// notification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 })
|
||||
// if (token) {
|
||||
// store.dispatch('Logout').then(() => {
|
||||
// setTimeout(() => {
|
||||
// window.location.reload()
|
||||
// }, 1500)
|
||||
// })
|
||||
// }
|
||||
break
|
||||
default:
|
||||
notification.error({
|
||||
@@ -121,7 +143,7 @@ service.interceptors.request.use(config => {
|
||||
...config.params
|
||||
}
|
||||
}
|
||||
} else if((config.method == 'post')) {
|
||||
} else if ((config.method == 'post')) {
|
||||
config.data = {
|
||||
cut: cut,
|
||||
...config.data
|
||||
|
||||
Reference in New Issue
Block a user