Browse Source

根据重置密码要求service.ts添加code == 1002000010返回错误码

hella_online_20240829
zhang_li 3 months ago
parent
commit
d05e4fc8f0
  1. 8
      src/config/axios/service.ts

8
src/config/axios/service.ts

@ -182,6 +182,14 @@ service.interceptors.response.use(
'<div>5 分钟搭建本地环境</div>'
})
return Promise.reject(new Error(msg))
} else if (code === 1002000010) {
if (msg === '无效的刷新令牌') {
// hard coding:忽略这个提示,直接登出
console.log(msg)
} else {
ElNotification.error({ title: msg })
}
return Promise.reject(data)
} else if (code !== 200) {
if (msg === '无效的刷新令牌') {
// hard coding:忽略这个提示,直接登出

Loading…
Cancel
Save