响应拦截器,错误信息增加msg取值
This commit is contained in:
parent
98f0c360d4
commit
f0df682cc6
|
@ -119,12 +119,6 @@ instance.interceptors.response.use(
|
||||||
if (_old_href === _new_href) {
|
if (_old_href === _new_href) {
|
||||||
location.reload()
|
location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
// location.reload()
|
|
||||||
// 西海岸-不重新加载
|
|
||||||
// if(!whoShow.itShowXiHaiAn) {
|
|
||||||
// location.reload()
|
|
||||||
// }
|
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
if (response.headers.redirect === '/#/login') {
|
if (response.headers.redirect === '/#/login') {
|
||||||
|
@ -150,7 +144,7 @@ instance.interceptors.response.use(
|
||||||
location.reload()
|
location.reload()
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
handleCode(code, message, response.headers)
|
handleCode(code, message || response.data.msg, response.headers)
|
||||||
if (loadingInstance) loadingInstance.close()
|
if (loadingInstance) loadingInstance.close()
|
||||||
// const { data, config } = response
|
// const { data, config } = response
|
||||||
// const { code, msg } = data
|
// const { code, msg } = data
|
||||||
|
|
Loading…
Reference in New Issue