feat: 大屏

This commit is contained in:
ygx
2026-01-25 17:31:51 +08:00
parent 864345317d
commit e2fe633b28
7 changed files with 48 additions and 14 deletions

View File

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