mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-07 03:07:56 +08:00
6ea1ead263
问题描述: - AILearning组件直接使用硬编码的localhost:8080地址 - 绕过了Vite代理配置,导致加载失败 - 在生产环境无法正常工作 修复内容: 1. api.ts: 添加统一的getPerformance()方法 2. AILearning.tsx: 移除硬编码URL,使用统一API 3. 删除多余的fetcher函数 技术改进: - 使用Vite代理配置,避免CORS问题 - 统一API管理,提高可维护性 - 支持开发和生产环境 影响范围: - web/src/lib/api.ts: +11行 (新增getPerformance方法) - web/src/components/AILearning.tsx: -4行, +2行 (重构API调用) Co-Authored-By: tinkle-community <tinklefund@gmail.com>