yzexam/README.md

84 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# yzexam
在线考试系统
## 功能特性
- 用户登录/注销
- 微信扫码登录
- 考试管理
- 题库管理
- 成绩统计
- AI题目生成
## 微信扫码登录配置
系统已集成微信扫码登录功能,用户可以通过微信扫描二维码的方式登录系统。
### 配置步骤
1. 在微信公众平台申请服务号并获取AppID和AppSecret
2. 在`exam-online-api/ruoyi-admin/src/main/resources/application.yml`中配置微信参数:
```yaml
wechat:
# 微信公众号AppId
app-id: your_wechat_appid
# 微信公众号AppSecret
app-secret: your_wechat_app_secret
# 授权回调地址
redirect-uri: http://your-domain.com/examapi/wechat/callback
```
3. 执行数据库脚本`doc/微信登录字段添加.sql`更新数据库表结构
### 使用说明
1. 访问系统登录页面
2. 点击"微信扫码登录"按钮
3. 使用微信扫描生成的二维码
4. 在微信中确认登录
5. 系统将自动跳转到主页
## AI题目生成功能
系统集成了AI题目生成功能可以通过调用AI大模型API来自动生成各种类型的题目。
### 配置步骤
1. 在`exam-online-api/ruoyi-admin/src/main/resources/application.yml`中配置AI API参数
```yaml
ai:
# DeepSeek API配置
api-url: https://api.deepseek.com/v1/chat/completions
model-name: deepseek-chat
api-key: your_deepseek_api_key
connect-timeout: 30
read-timeout: 60
write-timeout: 30
# OpenRouter API配置
openrouter:
api-url: https://openrouter.ai/api/v1/chat/completions
model-name: deepseek/deepseek-v3-0324-free
api-key: your_openrouter_api_key
enabled: false
```
2. 执行数据库脚本`doc/ai_question_permissions.sql`添加相关权限
### 使用说明
1. 进入"题库管理"模块
2. 选择一个题库或创建新题库
3. 点击"AI生成题目"按钮
4. 配置生成参数并生成题目
5. 点击"保存到题库"将题目保存到当前题库中
## 技术栈
- 后端Spring Boot + MyBatis + Spring Security
- 前端Vue.js + Element UI
- 数据库MySQL
- 微信集成Weixin Java SDK