1.2 KiB
MP Version Status Implementation Plan
For agentic workers: Implement task-by-task. Steps use checkbox syntax.
Goal: Show WeChat mini-program version and update status (“已是最新” / “有新版本…”) on the Workbench page.
Architecture: Extend mpUpdate.js with account info + status machine + subscribe API; Workbench page renders one tappable line and drives user-initiated checks. Keep App.vue checkMpUpdate() calls unchanged.
Tech Stack: uni-app Vue 3, WeChat getUpdateManager / getAccountInfoSync
Task 1: Extend mpUpdate.js
Files:
-
Modify:
miniprogram/utils/mpUpdate.js -
Export account info, status snapshot, subscribe, extend
checkMpUpdate({ force, fromUser }) -
Wire
onCheckForUpdate/onUpdateReady/onUpdateFailedto status -
Keep force-update modal behavior
Task 2: Workbench page UI
Files:
-
Modify:
miniprogram/pages/workbench/workbench.vue -
Revert:
miniprogram/pages/mine/mine.vue(不放版本行) -
Subscribe to status; show version line; tap to check / restart
-
onShowrefresh + check
Task 3: Demo + graph
- Update HTML demo to include Mine version line states
- Run graphify update for miniprogram