Archive the differentiated YuXinGu product docs, AI engineering system, design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity over early innovation (see .ai/product/STRATEGY.md). Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
Markdown
48 lines
1.4 KiB
Markdown
# Platform Contract — WeChat Mini Program
|
|
|
|
Client: `apps/mini-program`.
|
|
Design language shared with H5; **implementation is native mini-program**, not Vue SFC reuse.
|
|
|
|
Tokens: map `packages/ui` values into `app.wxss` / CSS variables supported by the base library — do not fork a second palette.
|
|
|
|
---
|
|
|
|
## MUST
|
|
|
|
- Use Mini Program lifecycle (`onLoad` / `onShow` / …) and `wx` APIs.
|
|
- Native navigation (`wx.navigateTo`, tabBar in `app.json`).
|
|
- Components under `components/`; pages call `services/*` only (same idea as H5 sdk).
|
|
- Support: share (`onShareAppMessage`), user authorization, payment flow when enabled.
|
|
- Touch ≥ 44px; rpx spacing aligned to 4/8/12/16… scale.
|
|
- Same IA tabs and domain copy rules as H5.
|
|
- Paywall / Membership decisions still from API — never local unlock only.
|
|
|
|
---
|
|
|
|
## MUST NOT
|
|
|
|
- `window` / `document` / DOM browser APIs.
|
|
- Import Vue SFCs from `user-h5` as runtime.
|
|
- Duplicate brand colors with new hex values.
|
|
- Build UGC广场 or Consult marketplace in MVP.
|
|
|
|
---
|
|
|
|
## Mapping
|
|
|
|
| H5 | Mini Program |
|
|
|---|---|
|
|
| Vue page | `pages/*` |
|
|
| Pinia | global / store pattern approved in playbook |
|
|
| `@yuxingu/sdk` | same package or thin `services` wrapper |
|
|
| CSS modules | `wxss` + shared token sheet |
|
|
|
|
---
|
|
|
|
## Checklist
|
|
|
|
- [ ] No browser-only APIs
|
|
- [ ] Tokens mapped 1:1
|
|
- [ ] Share / auth / pay paths considered
|
|
- [ ] Catalog names reused
|