This commit is contained in:
qsh
2024-06-21 16:09:34 +08:00
parent 44e45349c2
commit 25e13bd975
15 changed files with 216 additions and 58 deletions

View File

@@ -199,6 +199,16 @@ service.interceptors.response.use(
console.log(msg)
} else {
ElNotification.error({ title: msg })
if (code == 403) {
// 无访问权限,退出登录
const { wsCache } = useCache()
const tenantId = wsCache.get('TENANT_ID')
const appId = wsCache.get('App_ID')
resetRouter() // 重置静态路由表
wsCache.clear()
removeToken()
window.location.href = `/login?tenantId=${tenantId}&appId=${appId}`
}
}
return Promise.reject('error')
} else {