f
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user