diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index 891ee21..490ccd1 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -85,7 +85,9 @@ apiClient.interceptors.response.use( } } clearStoredAdminUser() - window.location.href = '/login' + if (window.location.pathname !== '/login') { + window.location.href = '/login' + } return Promise.reject(new ApiError('登录已过期', 401)) }