Commit Graph

3 Commits

Author SHA1 Message Date
lc ddfcd14252 fix: timer 后台回到前台时立即刷新 UI
WeChat 在后台冻结 setInterval,用户从训练页切走再回来时
看到的还是离开前的画面。注册 wx.onAppShow 监听器,回到
前台立即强制 _tick() 一次,UI 跳到真实 elapsed,半程/30s/10s
等延迟到达的提醒也能补触发。
2026-07-08 14:09:35 +08:00
lc 8c7f633541 refactor: ES6+ modernization + 2 bugfixes
- var→const/let, function→arrow/class across all 13 JS files
- Timer: prototype→class with ES6 getters
- plan days: IIFE→Array.from declarative generation
- storage/plan: unified formatDate via util.js
- Bugfix: getPlanDay now filters by planId (plan switch accuracy)
- Bugfix: getTodayRecord searches all months (cross-month boundary)
- WXML/WXSS unchanged; public API unchanged
2026-06-04 16:29:25 +08:00
lc ff2700c067 backup: snapshot before optimization 2026-06-04 16:25:43 +08:00