v1.3 看得见:三色错题本(红/黄/绿+待做视图) + 收尾页(表扬行为) + 小狮落库(pet_stage/pet_fed_at,247 测试)
This commit is contained in:
@@ -618,3 +618,14 @@ python tools/backfill_kp.py --apply # 真写
|
||||
|
||||
调用成本:预览与正式入库调的是同一个 `recognize_block`,裁剪图按 sha1 命中
|
||||
`data/ocr_cache/`,所以预览这一遍**不额外花钱**(除非把 `OCR_CACHE=0` 关了)。
|
||||
|
||||
### 四点二十七、小狮落库:跨设备一致
|
||||
|
||||
`children` 表加了两列:`pet_stage`(0/1/2/3,按已毕业数 12 / 40 / 100 分档)和 `pet_fed_at`(最后喂食日期)。
|
||||
|
||||
- `services._pet_sync(conn, cid)` 现算:`graduated` = 已毕业数,`left_today` = 今天到期且未毕业的题数。
|
||||
- `fed_today` 的条件是 **`left_today == 0` 且今天真有一道题做过**——不是打卡,也不是打开页面就算。
|
||||
新号没有做题记录时不给「喂过」,否则白送一次。
|
||||
- 只有 `stage` 变了、或今天第一次喂,才 `UPDATE`;`GET /api/children` 不会天天写库。
|
||||
- `get_child()` / `list_children()` / `attempt()` 的返回体都带 `pet: {stage, fed_at, fed_today, graduated, left_today}`,
|
||||
前端优先用服务端的 `stage`(演示模式才本地算)。
|
||||
|
||||
Reference in New Issue
Block a user