--- title: Checkpoint 2026-11-15 01:57:06 UTC [5d437f6c0d] type: checkpoint permalink: main/projects/f5708b07-f0ea-42a4-b4ed-0e5443990ff9/checkpoint-2026-11-15-01-57-06-utc-5d437f6c0d stable_id: 8b82ea2a-b1d6-4164-a63a-960229b145f5 scope: project memory_type: checkpoint project_id: f5708b07-f0ea-42a4-b4ed-0e5443990ff9 usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 status: active revision: 1 request_id: ckpt-hours-source-pages-20261115 created_at: '2026-11-15T01:57:06.587632+00:00' updated_at: '2026-11-15T01:57:06.587632+00:00' tags: - hours - home - history --- ## 完成 首页、学时历史顶部学时、自动学习达标判断都跟管理端 hours_source 走。当前配置 api 时两边都是本年 11739 / 本月 58 / 今日 6 / 累计 37048,与 euniv「我的学时」一致。 ## 关键实现 - client.history_hour_totals 按北京时间加成累计/年/月/日。 - service._apply_hours_source:history 时覆盖 year/month/today/total;api 时用官方接口。学分积分仍走接口。 - 学时历史页不再本地加总列表,改用接口返回的四项。 - 凭证刷新写 month_hours 也按同一来源。HoursWatcher 原本已按 source 判断。 - 管理端提示改为「首页、学时历史和达标判断使用同一来源」。 ## 验证 100 pytest 通过;npm run build 通过。实机 api 模式下 /api/home/summary 与 /api/home/history 四项学时完全一致。已重启 uvicorn(无 --reload)。未点立即开始。 ## 下一步 用户刷新首页和学时历史。切到「学时历史统计」后两边会改成列表合计。未 git commit。 ## 给下个会话 - uvicorn 新进程 127.0.0.1:8000,无 --reload。 - 不要提交 data/、Temp/、web/dist、.chlz。用户明确要求才 commit。 - 未提交包仍含心跳 0、学习协议、首页定时保存、本轮学时来源对齐。 - SOCKS4、测试全部代理阻塞仍是旧问题。