mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
fix:页面权限刷新判断显示问题修改
This commit is contained in:
@@ -61,6 +61,8 @@ http.interceptors.response.use(
|
||||
(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))
|
||||
// TODO token过期后退出登录 清空当前用户标记 - 为了刷新页面使用
|
||||
localStorage.removeItem('refreshPage')
|
||||
return Promise.reject(response);
|
||||
}
|
||||
show && message.error(msg);
|
||||
|
||||
@@ -33,9 +33,15 @@ const timers = setInterval(() => {
|
||||
if(pathArr.length!==0){
|
||||
// 刷新界面是否重新执行
|
||||
if(pathArr.indexOf(currentPath)==-1){
|
||||
if(localStorage.getItem("refreshPage") == "jumpverify"){
|
||||
clearInterval(timers)
|
||||
return
|
||||
}
|
||||
clearInterval(timers)
|
||||
router.push({path: pathArr[0]})
|
||||
localStorage.setItem("refreshPage", "jumpverify")
|
||||
}else{
|
||||
localStorage.setItem("refreshPage", "jumpverify")
|
||||
clearInterval(timers)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user