【修改】去除error500方法,全都替换为error
【修改】修改token过期,但是接口访问依然不返回登录页的bug
This commit is contained in:
@@ -39,7 +39,7 @@ const err = (error) => {
|
||||
break;
|
||||
}
|
||||
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
if(token && data.message.includes("Token失效")){
|
||||
if(token && data.includes("Token失效")){
|
||||
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
|
||||
if (/wxwork|dingtalk/i.test(navigator.userAgent)) {
|
||||
Vue.prototype.$Jmessage.loading('登录已过期,正在重新登陆', 0)
|
||||
@@ -50,18 +50,7 @@ const err = (error) => {
|
||||
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()
|
||||
}
|
||||
})
|
||||
store.dispatch('Logout')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user