refactor(backend): 更新默认提供商路径获取方法并配置前端请求基础 URL

- 新增 get_builtin_providers_path 函数以动态获取内置提供商 JSON 文件路径
- 修改 seed_default_providers 函数,使用新的路径获取方法
- 更新前端请求工具,配置 API 基础 URL 以适应不同环境
This commit is contained in:
黄建武
2025-05-09 10:41:46 +08:00
parent 274d7b9677
commit 2dfcb600ae
2 changed files with 10 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import axios from 'axios'
const request = axios.create({
baseURL: '/api', // 默认请求路径前缀
baseURL: import.meta.env.VITE_API_BASE_URL || 'http://localhost:8000',
timeout: 10000,
})