mirror of
https://github.com/handsomezhuzhu/QQuiz.git
synced 2026-02-20 20:10:14 +00:00
feat: 实现数据库驱动的API配置管理和项目结构重组
## 新功能 - 实现管理后台API配置管理(OpenAI/Anthropic/Qwen) - API配置保存到数据库,实时生效无需重启 - API密钥遮罩显示(前10位+后4位) - 完整endpoint URL自动显示 ## 后端改进 - 新增 config_service.py 用于加载数据库配置 - LLMService 支持动态配置注入,回退到环境变量 - 更新 exam.py 和 question.py 使用数据库配置 - 扩展 schemas.py 支持所有API配置字段 ## 前端改进 - 重写 AdminSettings.jsx 增强UI体验 - API密钥显示/隐藏切换 - 当前使用的提供商可视化标识 - 移除"需要重启"的误导性提示 ## 项目结构重组 - 移动所有脚本到 scripts/ 目录 - 移动所有文档到 docs/ 目录 - 清理 Python 缓存文件 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
44
scripts/run_frontend_local.bat
Normal file
44
scripts/run_frontend_local.bat
Normal file
@@ -0,0 +1,44 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
title QQuiz Frontend - 本地运行
|
||||
|
||||
echo.
|
||||
echo ==========================================
|
||||
echo QQuiz Frontend - 本地启动
|
||||
echo ==========================================
|
||||
echo.
|
||||
|
||||
cd /d "%~dp0..\frontend"
|
||||
|
||||
REM 检查 node_modules 是否存在
|
||||
if not exist "node_modules" (
|
||||
echo [1/2] 安装前端依赖(首次运行需要几分钟)...
|
||||
echo.
|
||||
echo [提示] 使用淘宝镜像加速下载...
|
||||
call npm config set registry https://registry.npmmirror.com
|
||||
call npm install
|
||||
if %errorlevel% neq 0 (
|
||||
echo [错误] 依赖安装失败
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo [完成]
|
||||
echo.
|
||||
) else (
|
||||
echo [1/2] 依赖已安装
|
||||
echo.
|
||||
)
|
||||
|
||||
echo [2/2] 启动前端服务...
|
||||
echo.
|
||||
echo ==========================================
|
||||
echo 前端服务启动中...
|
||||
echo ==========================================
|
||||
echo.
|
||||
echo 前端地址: http://localhost:3000
|
||||
echo.
|
||||
echo 按 Ctrl+C 停止服务
|
||||
echo ==========================================
|
||||
echo.
|
||||
|
||||
call npm start
|
||||
Reference in New Issue
Block a user