修复规则问题

This commit is contained in:
Alex Yang
2025-12-15 16:04:45 +08:00
parent bcf3e865b6
commit 9aa328d466
31 changed files with 930011 additions and 2022 deletions

View File

@@ -38,13 +38,6 @@ async function apiRequest(endpoint, method = 'GET', data = null) {
// 优化错误响应处理
console.warn(`API请求失败: ${response.status}`);
// 处理401未授权错误重定向到登录页面
if (response.status === 401) {
console.warn('未授权访问,重定向到登录页面');
window.location.href = '/login';
return { error: '未授权访问' };
}
// 尝试解析JSON但如果失败直接使用原始文本作为错误信息
try {
const errorData = JSON.parse(responseText);