mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
fix bug
This commit is contained in:
@@ -57,9 +57,7 @@ http.interceptors.response.use(
|
||||
return response;
|
||||
}
|
||||
if (code === 1000) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
|
||||
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
|
||||
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
// TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(response);
|
||||
|
||||
@@ -49,7 +49,7 @@ http.interceptors.response.use(
|
||||
message.error('token过期请重新登陆');
|
||||
}
|
||||
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)
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
return Promise.reject(response);
|
||||
}
|
||||
// show && message.error(msg);
|
||||
|
||||
@@ -51,7 +51,7 @@ http.interceptors.response.use(
|
||||
message.error('token过期请重新登陆');
|
||||
}
|
||||
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)
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
return Promise.reject(response);
|
||||
}
|
||||
// show && message.error(msg);
|
||||
|
||||
@@ -495,9 +495,7 @@ export async function request(_url, params) {
|
||||
return res;
|
||||
}
|
||||
if (res.code === 1000 || res.code === 1002) {
|
||||
(process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'alpine') ?
|
||||
router.push({path: 'login', query: { returnUrl: router.currentRoute.value.fullPath }}) :
|
||||
(window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath))
|
||||
window.location.href = process.env.VUE_APP_LOGIN_URL + encodeURIComponent(window.location.protocol + process.env.VUE_APP_BOE_API_URL + process.env.VUE_APP_BASE + router.currentRoute.value.fullPath)
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(res);
|
||||
}else if(res.code=== 1001){
|
||||
|
||||
Reference in New Issue
Block a user