fix: token设置

This commit is contained in:
mx00085@163.com
2023-03-09 15:50:13 +08:00
parent 0f22c8a458
commit 4514db4b10

View File

@@ -24,7 +24,6 @@ http.interceptors.request.use(
config.headers.token = token; //测试1111 config.headers.token = token; //测试1111
} else{ } else{
message.error('未获取到登录信息,请先登录') message.error('未获取到登录信息,请先登录')
return window.location.href='https://u-pre.boe.com/web/';
} }
return config; return config;
}, },
@@ -48,7 +47,6 @@ http.interceptors.response.use(
} }
if(code==601){ if(code==601){
message.error('token过期请重新登陆'); message.error('token过期请重新登陆');
return window.location.href='https://u-pre.boe.com/web/';
} }
if (code === 1000) { if (code === 1000) {
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL) (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL)