This commit is contained in:
2026-04-25 11:59:14 +08:00
parent a7cd16848c
commit 138a0dc288
26 changed files with 1665 additions and 215 deletions

View File

@@ -253,9 +253,12 @@ const handleAuthError = (message) => {
// 显示错误消息
ElMessage.error(message)
const currentPath = router.currentRoute.value.path || ''
const loginPath = currentPath.startsWith('/sub/') ? '/sub/auth/login' : '/auth/login'
// 跳转到登录页面(如果不在登录页面)
if (router.currentRoute.value.path !== '/auth/login') {
router.push('/auth/login')
if (currentPath !== loginPath) {
router.push(loginPath)
}
}