Commit 35a3940e authored by 沈翠玲's avatar 沈翠玲

token处理

parent f41ca2f8
......@@ -68,8 +68,17 @@ class RequestClient {
hideLoading()
const { data, config } = response;
axiosCanceler.removePending(config);
if (data.code === 500 && data.message.includes('token')) {
router.replace(LOGIN_URL);
ElMessage({
message: '登录失效,请重新登录',
type: 'error',
plain: true,
});
return Promise.reject(data);
}
// 登录失效
if (data.code === 404 || data.code === 500) {
if (data.code === 404) {
router.replace(LOGIN_URL);
ElMessage({
message: '登录失效,请重新登录',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment