提交 0108cc58 authored 作者: pengxiaohui's avatar pengxiaohui

fix: 修复登录态失效时不会自动跳至登录页的问题

上级 fb063a50
......@@ -44,13 +44,9 @@ httpRequest.interceptors.request.use(
httpRequest.interceptors.response.use(
function(response) {
const { data } = response
if (data.code === 1 && data.msg === '请先登录') {
// Message.error(data.msg || data.message)
// window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
return Promise.reject(data)
}
if (data.code === 403) {
if ([1, 4001].includes(data.code)) {
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
// return Promise.reject(data)
}
return data
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论