【修改】去除error500方法,全都替换为error

【修改】修改token过期,但是接口访问依然不返回登录页的bug
This commit is contained in:
zer0Black
2022-04-17 22:44:29 +08:00
parent 725a72a178
commit b5ac2c4a1b
27 changed files with 141 additions and 179 deletions
+2 -13
View File
@@ -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')
}
})
}