后端依赖 WIP-303(阿仁,09e703a9 完工,L3 全链 PASS)已解除。本包=306 全量交付证据。
时间:2026-09-13 · 验收口径:tsc0 + 页面 L3 就绪(补丁待小冈代应用)
| 端点 | 方法 | 状态码 | 判定 |
|---|---|---|---|
| /api/miniapp/distribution/share-code | GET | 401 | 路由存在(未带 token) |
| /api/miniapp/distribution/profile | GET | 401 | 路由存在 |
| /api/miniapp/distribution/guests | GET | 401 | 路由存在 |
| /api/miniapp/distribution/commissions | GET | 401 | 路由存在 |
| /api/miniapp/distribution/subscription | GET | 401 | 路由存在 |
303 新增端点(register/withdrawals/key-tasks 系)随 ffa21932 上 main,staging 自动部署;沙箱不可达 8089,拓扑以代码核验为准(见下)。
| 端点 | 方法 | 请求体/参数 | 响应 data | 核验位置 |
|---|---|---|---|---|
| /distribution/register | POST | {name, phone} | {distributorId, status, message} 幂等 | miniapp_distribution.py RegisterIn |
| /distribution/withdrawals | POST | {amountFen:int} | {withdrawalId, status, amount, message} | WithdrawalApplyIn |
| /distribution/withdrawals | GET | — | [{id, amount, status, rejectReason, paidAt, createdAt}] | 列表倒序 |
| /distribution/withdrawals/available | GET | — | {available, minWithdraw}(元·字符串) | _resolve_distributor 闸门(active/paused 放行,403=非分销员) |
| /key-tasks | GET | ?limit | [{id, merchantId, title, description, rewardKeys, conditionType, conditionParam, totalStock, claimedCount, validFrom, validUntil}] | miniapp_key_tasks.py |
| /key-tasks/{id}/claim | POST | — | {claimId, status} 幂等 | 进行中只一条 |
| /key-tasks/mine | GET | — | [{claimId, taskId, title, rewardKeys, conditionType, status, completedAt, createdAt}] | |
| /key-tasks/claims/{id}/complete | POST | {evidence?} | {status, rewardKeys} | CompleteClaimIn |
| /key-tasks/balance | GET | — | {balance, frozen, available} | |
| /key-tasks/ledger | GET | ?limit | [{id, direction, amount, bizType, note, createdAt}] |
信封差异:distribution 域{code:0,data};key-tasks 域{ok:true,data}——utils/request.ts L31 双信封兼容解包,前端无需特判。
| 文件 | 新增函数 | 对应端点 |
|---|---|---|
| services/distribution.ts | registerDistributor / applyWithdrawal / getWithdrawals / getWithdrawalAvailable | register / withdrawals POST / withdrawals GET / available |
| services/distribution.ts | ShareCodeResponse 字段对齐(+deprecated 可选旧字段保 main tsc 绿) | share-code |
| services/key-tasks.ts(新) | getKeyTasks / claimKeyTask / getMyKeyTasks / completeKeyTaskClaim / getKeyBalance / getKeyLedger | key-tasks 6 端点 |
docs/handoff/2026-09-13-WIP306-分销福钥三新页-待小冈代应用.patch(git apply --check 双向验净):
| 页面 | 功能 | 诚实降级 |
|---|---|---|
| pages/distributor-center(新) | 注册申请(姓名+手机号)/身份探测(available 403→注册态)/提现申请+记录/工具入口(佣金台账·分享码·我的客人) | unavailable 空态;403 区分未注册/待审核 |
| pages/key-tasks(新) | 赚福钥(在售列表+领取)/我的任务(完成发放)双 tab | unavailable 空态;库存 0 禁领 |
| pages/key-balance(新) | 余额卡(可用/总/冻结)+流水(in/out 着色) | unavailable 空态 |
| pages/share-code(修) | 字段对齐 shareParam/shareTitle/shareDesc+复制参数串+归因 attribution_code | — |
| app.json | 注册三新页 | — |
git apply --check(正向)+ --check --reverse(反向)均通过