mirror of
https://github.com/handsomezhuzhu/QQuiz.git
synced 2026-02-20 20:10:14 +00:00
docs: 完善文档和清理项目,添加 Gemini 配置指南
主要更新: 📚 文档改进 - 新增 AI_CONFIGURATION.md:详细的 AI 提供商配置指南 - 新增 CHINA_MIRROR_GUIDE.md:中国镜像加速指南 - 删除 6 个过时文档(DEPLOYMENT.md, QUICK_START.md 等) - 更新 README.md:添加 Gemini 功能特性和 AI 提供商对比表 🧹 脚本清理 - 删除 11 个重复/过时脚本(从 25 个减少到 14 个) - 删除 PostgreSQL 相关脚本(项目使用 MySQL) - 删除重复的启动脚本(start_windows.bat, start_app.bat 等) ⚙️ 配置文件更新 - 更新 .env.example:添加 Gemini 配置示例和说明 - 默认 AI_PROVIDER 改为 gemini(推荐) - 添加各提供商的获取 API Key 链接 🎯 核心改进 - 突出 Gemini 原生 PDF 理解优势 - 提供清晰的 AI 提供商选择指南 - 简化项目结构,提高可维护性 清理内容: - 删除 docs: DEPLOYMENT.md, DOCKER_MIRROR_SETUP.md, GITHUB_PUSH_GUIDE.md, QUICK_START.md, README_QUICKSTART.md, START_HERE.txt - 删除 scripts: auto_setup_and_run.bat, check_postgres.bat, logs_windows.bat, push_to_github.bat, quick_config.bat, restart_docker.bat, setup_docker_mirror.bat, start_app.bat, start_postgres.bat, start_windows.bat, start_windows_china.bat 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
22
frontend/Dockerfile.china
Normal file
22
frontend/Dockerfile.china
Normal file
@@ -0,0 +1,22 @@
|
||||
# Dockerfile with China mirrors for faster builds
|
||||
# Usage: docker build -f Dockerfile.china -t qquiz-frontend .
|
||||
|
||||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package*.json ./
|
||||
|
||||
# Install dependencies using Taobao npm registry
|
||||
RUN npm config set registry https://registry.npmmirror.com && \
|
||||
npm install
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Start development server
|
||||
CMD ["npm", "start"]
|
||||
@@ -98,9 +98,17 @@ export const ExamList = () => {
|
||||
toast.success('题库创建成功,正在解析文档...')
|
||||
setShowCreateModal(false)
|
||||
setFormData({ title: '', file: null })
|
||||
await loadExams()
|
||||
|
||||
// 跳转到新创建的试卷详情页
|
||||
if (response.data && response.data.exam_id) {
|
||||
navigate(`/exams/${response.data.exam_id}`)
|
||||
} else {
|
||||
// 如果没有返回 exam_id,刷新列表
|
||||
await loadExams()
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to create exam:', error)
|
||||
toast.error('创建失败:' + (error.response?.data?.detail || error.message))
|
||||
} finally {
|
||||
setCreating(false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user