提交 3ddf9f9f authored 作者: lihuihui's avatar lihuihui

修改登录

上级 6f913194
......@@ -31,7 +31,11 @@ httpRequest.interceptors.response.use(
const { data } = response
if (data.code !== 0 && data.code !== -1) {
if (data.msg !== '修改成功') {
return Message.error(data.msg)
if (data.msg === '请先登录') {
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
} else {
return Message.error(data.msg)
}
} else {
if (data.code === 1 || data.code === 4001) {
console.log('重新登录')
......@@ -45,9 +49,6 @@ httpRequest.interceptors.response.use(
}
return Promise.reject(data)
}
if (data.mag === '请先登录') {
window.location.href = `${webConf.others.loginUrl}?rd=${encodeURIComponent(window.location.href)}`
}
return data
},
function(error) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论