添加返回数据日志,查看API响应内容

添加日志:
1. 打印fetchConversations返回的完整数据
2. 打印fetchAppParams返回的完整数据
3. 打印chat组件接收到的数据
4. 打印解析后的conversations数组

帮助诊断数据格式问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-30 14:55:46 +08:00
parent a5e5f289c1
commit 78e218b953
2 changed files with 12 additions and 4 deletions
+8 -2
View File
@@ -543,7 +543,10 @@ export const fetchConversations = async () => {
throw new Error(`Failed to fetch conversations: ${res.status} - ${text}`);
});
}
return res.json();
return res.json().then(data => {
console.log('📋 [API Client] 会话列表数据:', data);
return data;
});
}).catch(err => {
console.error('❌ [API Client] 会话列表请求异常:', err);
throw err;
@@ -628,7 +631,10 @@ export const fetchAppParams = async () => {
throw new Error(`Failed to fetch app params: ${res.status} - ${text}`);
});
}
return res.json();
return res.json().then(data => {
console.log('⚙️ [API Client] 应用参数数据:', data);
return data;
});
}).catch(err => {
console.error('❌ [API Client] 应用参数请求异常:', err);
throw err;