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>
24 lines
580 B
Markdown
24 lines
580 B
Markdown
# mini-program
|
||
|
||
微信小程序客户端(业务后置)。
|
||
|
||
## 接入约定
|
||
|
||
1. 使用 `packages/sdk` 的 `createClient`,注入微信适配器:
|
||
|
||
```ts
|
||
// 伪代码
|
||
createClient({
|
||
baseURL: 'https://api.example.com',
|
||
adapters: {
|
||
request: (opts) => wxRequestToApiResponse(opts),
|
||
getToken: () => wx.getStorageSync('yxg_token') || null,
|
||
},
|
||
})
|
||
```
|
||
|
||
2. 页面禁止直接 `wx.request`;统一 `services/*`。
|
||
3. 类型复用 `@yuxingu/types`;UI 组件不与 Vue H5 共享 SFC,只共享 `packages/ui` token。
|
||
|
||
详见 `apps/docs/standards/06-mini-program.md`。
|