fix: prevent infinite redirect loop on /login page
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 12s

This commit is contained in:
wangdl 2026-07-08 19:45:14 +08:00
parent 26f20cb826
commit 76f1dcbe8d

View File

@ -85,7 +85,9 @@ apiClient.interceptors.response.use(
}
}
clearStoredAdminUser()
if (window.location.pathname !== '/login') {
window.location.href = '/login'
}
return Promise.reject(new ApiError('登录已过期', 401))
}