视频提词优化管理后台配置build dist merge

This commit is contained in:
2026-06-22 14:42:18 +08:00
10 changed files with 649 additions and 33 deletions
+5 -1
View File
@@ -110,7 +110,11 @@ export async function apiRequest<T>(path: string, options: RequestOptions = {}):
const msg = parsed?.detail || `请求失败 (${res.status})`;
if (res.status === 401) {
clearToken();
window.location.href = '/login';
// Only redirect to login if not already on login page
const currentPath = window.location.pathname;
if (currentPath !== '/login') {
window.location.href = '/login';
}
}
throw new Error(msg);
}