35 lines
1.2 KiB
Markdown
35 lines
1.2 KiB
Markdown
# 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`
|
|
|
|
- [x] Export account info, status snapshot, subscribe, extend `checkMpUpdate({ force, fromUser })`
|
|
- [x] Wire `onCheckForUpdate` / `onUpdateReady` / `onUpdateFailed` to status
|
|
- [x] Keep force-update modal behavior
|
|
|
|
### Task 2: Workbench page UI
|
|
|
|
**Files:**
|
|
- Modify: `miniprogram/pages/workbench/workbench.vue`
|
|
- Revert: `miniprogram/pages/mine/mine.vue`(不放版本行)
|
|
|
|
- [x] Subscribe to status; show version line; tap to check / restart
|
|
- [x] `onShow` refresh + check
|
|
|
|
### Task 3: Demo + graph
|
|
|
|
- [x] Update HTML demo to include Mine version line states
|
|
- [x] Run graphify update for miniprogram
|