feat: 大屏
This commit is contained in:
@@ -78,8 +78,11 @@ axiosInstance.interceptors.response.use(
|
||||
// 登录过期
|
||||
if (code === ResultEnum.TOKEN_OVERDUE) {
|
||||
window['$message'].error(window['$t']('http.token_overdue_message'))
|
||||
// iframe 嵌入模式下,token 过期不重定向到登录页
|
||||
console.error('[GoView] iframe 模式:token 已过期,请更新 URL 中的 token 参数')
|
||||
// token 过期,跳转到源站首页
|
||||
console.error('[GoView] token 已过期,即将跳转到源站首页')
|
||||
setTimeout(() => {
|
||||
window.location.href = window.location.origin
|
||||
}, 1500)
|
||||
return Promise.resolve(responseData)
|
||||
}
|
||||
|
||||
@@ -97,7 +100,8 @@ axiosInstance.interceptors.response.use(
|
||||
const status = err.response?.status
|
||||
switch (status) {
|
||||
case 401:
|
||||
routerTurnByName(PageEnum.BASE_LOGIN_NAME)
|
||||
// token 失效,跳转到源站首页
|
||||
window.location.href = window.location.origin
|
||||
Promise.reject(err)
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user