添加登录内容,尚未完善,先创建分支

This commit is contained in:
2025-07-14 12:31:43 +08:00
parent e3109423d4
commit fff474f46b
25 changed files with 2693 additions and 1102 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ export async function apiRequest<T>(
// 检查API返回的状态码
const data = response.data;
if (data && 'code' in data && data.code !== 0) {
if (data && typeof data === 'object' && 'code' in data && data.code !== 0) {
console.error(`API请求失败: ${data.message || data.msg || '未知错误'} - ${url}`);
return {
error: data.message || data.msg || '请求失败',