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

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