样式优化

This commit is contained in:
孙佳艺
2026-05-26 13:47:24 +08:00
parent d61dcdc8db
commit 01d15276ba
23 changed files with 6265 additions and 747 deletions
+2 -1
View File
@@ -106,10 +106,11 @@ export async function apiRequest<T>(path: string, options: RequestOptions = {}):
}
// Handle error responses
if (!res.ok) {
if (!res.ok) {
const msg = parsed?.detail || `请求失败 (${res.status})`;
if (res.status === 401) {
clearToken();
window.location.href = '/login';
}
throw new Error(msg);
}