forked from wangziqi/gongxue-base
feat: add vocabulary review planning
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
| --- | --- | --- |
|
||||
| 单词单元/单词列表 | 可联调 | `/api/catalog/vocabulary-units`、`vocabulary-words` |
|
||||
| 单词进度/收藏/统计 | 可联调 | `/api/learning/vocabulary/*` |
|
||||
| 艾宾浩斯复习算法 | 待补齐 | 当前有 next_review 字段基础,缺完整算法和每日计划 |
|
||||
| 单词复习算法/每日计划 | 可联调 | `GET /api/learning/vocabulary/review-plan`、`POST /api/learning/vocabulary/review`;后端计算 `nextReviewDate`、连续正确、掌握状态和待复习计划 |
|
||||
| 知识手册目录/内容 | 可联调 | `/api/catalog/handbook-*` |
|
||||
| 知识手册 JSON 导入 | 可联调 | `/api/tenant-content/imports/*/handbook` |
|
||||
| 分数线字段/院校/专业/记录/趋势 | 可联调 | `/api/scoreline/*` |
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
| 错题本 | 用户 stats/错题逻辑 | 已覆盖 | 错题列表、移出错题、复习计划和 `wrong_review` 后端组卷已覆盖;后续补更细的间隔复习算法 |
|
||||
| 收藏夹 | `WordFavoritesPage.tsx`、题目收藏 | 已覆盖 | 题目和单词收藏已有 |
|
||||
| 题目视频 | `VideoPlayer.tsx` | 部分覆盖 | 题目视频查询、播放签名、SVIP/次数扣减、播放日志已有;缺深度防盗链、动态水印、播放统计报表 |
|
||||
| 背单词 | `VocabularyPage.tsx`、`VocabularyQuiz.tsx` | 部分覆盖 | 单词列表/进度/收藏/统计已有;缺完整艾宾浩斯算法、每日计划、收藏练习细节 |
|
||||
| 背单词 | `VocabularyPage.tsx`、`VocabularyQuiz.tsx` | 部分覆盖 | 单词列表、进度、收藏、统计、每日计划和后端复习调度已覆盖;后续补收藏练习体验、发音策略和更精细的间隔算法参数 |
|
||||
| 知识手册 | `Handbook*.tsx` | 已覆盖 | 前端需做好 Markdown/公式/图片渲染和搜索体验 |
|
||||
| 分数线 | `ScorelinePage.tsx` | 已覆盖 | 动态字段/趋势已有;缺批量导入和复杂筛选优化 |
|
||||
| 商城/SVIP | `Store.tsx`、`SvipModal.tsx` | 部分覆盖 | 套餐/订单/权益/激活码已有;缺真实支付、优惠券抵扣 |
|
||||
|
||||
@@ -79,7 +79,8 @@
|
||||
|
||||
6. 学习统计
|
||||
- 已完成免费额度、练习访问事件、模考交卷评分报告、练习历史、正确率趋势、题型分布、错题复习计划。
|
||||
- 继续补单词复习算法、每日计划、排行榜。
|
||||
- 已完成单词复习算法、每日计划和复习上报。
|
||||
- 继续补排行榜。
|
||||
- 继续补模考排名、断点续练、复盘体验。
|
||||
|
||||
7. 数据看板
|
||||
@@ -144,7 +145,7 @@
|
||||
4. 背单词
|
||||
- 单元列表、单词列表
|
||||
- 学习状态、收藏、统计
|
||||
- 后续补复习算法
|
||||
- 每日新词、复习计划、认识/不认识上报
|
||||
|
||||
5. 知识手册
|
||||
- 手册入口、章节、小节、知识点阅读
|
||||
|
||||
@@ -144,7 +144,7 @@ tenant:<tenantId>:theme
|
||||
| 练习历史/统计 | `GET /api/learning/practice-sessions/history`、`GET /api/learning/stats`、`GET /api/learning/trend` |
|
||||
| 题目视频 | `GET /api/questions/{questionId}/videos`、`POST /api/questions/videos/batch`、`POST /api/videos/play` |
|
||||
| 背单词 | `/api/catalog/vocabulary-units`、`/api/catalog/vocabulary-words` |
|
||||
| 单词进度 | `/api/learning/vocabulary/progress`、`/api/learning/vocabulary/stats` |
|
||||
| 单词进度/计划 | `/api/learning/vocabulary/progress`、`/api/learning/vocabulary/stats`、`/api/learning/vocabulary/review-plan`、`POST /api/learning/vocabulary/review` |
|
||||
| 单词收藏 | `/api/learning/vocabulary/favorites` |
|
||||
| 知识手册 | `/api/catalog/handbook-subjects`、`handbook-chapters`、`handbook-entries` |
|
||||
| 分数线 | `/api/scoreline/fields`、`schools`、`majors`、`records`、`trend`、`years` |
|
||||
@@ -293,6 +293,52 @@ tenant:<tenantId>:theme
|
||||
- 收藏夹复习同理可调用 `POST /api/learning/practice-sessions`,body 为 `{ "mode": "favorite_review", "questionLimit": 20 }`。
|
||||
- 趋势图以接口返回日期桶为准,缺失日期后端会补 0,不需要前端补点。
|
||||
|
||||
### 背单词计划与复习上报
|
||||
|
||||
背单词页面分三类数据:单元列表、每日计划、单词进度。前端不需要计算下次复习日期,只提交“认识/不认识”,由后端统一更新 `nextReviewDate`、连续正确、掌握状态和每日复习计划。
|
||||
|
||||
取今日计划:
|
||||
|
||||
```http
|
||||
GET /api/learning/vocabulary/review-plan?unitId=<unitId>&reviewLimit=30&newLimit=20
|
||||
```
|
||||
|
||||
响应关键字段:
|
||||
|
||||
```json
|
||||
{
|
||||
"item": {
|
||||
"dueCount": 3,
|
||||
"newCount": 20,
|
||||
"totalPlanned": 23,
|
||||
"dueWords": [{ "wordId": "...", "status": "reviewing", "dueLevel": "soon" }],
|
||||
"newWords": [{ "wordId": "...", "status": "new", "dueLevel": "new" }],
|
||||
"words": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
上报单词复习结果:
|
||||
|
||||
```json
|
||||
{
|
||||
"wordId": "00000000-0000-0000-0000-000000000812",
|
||||
"result": "known"
|
||||
}
|
||||
```
|
||||
|
||||
`result` 可传:
|
||||
|
||||
- `known`:认识/答对。
|
||||
- `unknown`:不认识/答错。
|
||||
|
||||
前端处理规则:
|
||||
|
||||
- `review-plan.words` 是本轮学习队列;卡片翻转、上一个、跳转、收藏状态属于前端交互。
|
||||
- 每个单词点击“认识/不认识”后调用 `POST /api/learning/vocabulary/review`。
|
||||
- 返回的 `status`、`dueLevel`、`nextReviewDate` 作为后续展示依据,不在前端重算间隔。
|
||||
- 旧的 `POST /api/learning/vocabulary/progress` 保留给兼容和后台手工修正;普通学习流优先用 `vocabulary/review`。
|
||||
|
||||
## 视频播放契约
|
||||
|
||||
题目视频分为 `free`、`svip`、`video_quota` 三种访问模式。列表接口只用于展示标题、封面、时长、访问模式和试看秒数;除免费公开视频外,列表和搜索接口不会返回可播放 URL。
|
||||
|
||||
Reference in New Issue
Block a user