This commit is contained in:
yuping
2023-09-19 17:05:40 +08:00
parent 830d20b082
commit 9ab862397b
5 changed files with 5 additions and 9 deletions

View File

@@ -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){