feat(M08-A): 接入顾客端权益明细
This commit is contained in:
@@ -129,3 +129,31 @@ M08-A 仍为 `PARTIAL`。本次完成顾客端第一段工程闭环,但订单
|
||||
|
||||
- 工程提交:`dbdfe3d`
|
||||
- 远端校验:待本轮 push 后执行 `HEAD == origin/main`。
|
||||
|
||||
## 2026-06-25 续接:顾客端权益明细与微信支付调起
|
||||
|
||||
- 后端 `MemberProfileService` 新增 `getMyBenefits`,按当前登录顾客读取本人优惠券和套餐持有明细,返回状态、金额、分钟、剩余次数、有效期、适用范围和冻结订单,不暴露其他用户权益。
|
||||
- 新增 `GET /app-api/profile/benefits`,复用登录态和 `profile.read` 权限校验,只允许读取当前用户本人权益。
|
||||
- `backend/tests/member-profile-service.test.mjs` 与 `backend/tests/member-profile-route.test.mjs` 扩展覆盖权益明细查询和本人鉴权。
|
||||
- 小程序新增 `pages/benefits/index` 权益明细页,个人中心新增入口,可展示优惠券和套餐的可用/锁定/已用尽状态、金额、分钟、有效期和适用范围。
|
||||
- 小程序 `utils/api.js` 新增 `requestWechatPayment`,房间下单页新增“微信支付”按钮:先创建 `WECHAT` 支付单,再调用 `/pay/wechat/prepay`,仅在后端返回真实预支付参数后调用 `wx.requestPayment`;测试支付路径保留。
|
||||
- `scripts/check-miniapp-m08-a.mjs` 扩展检查权益页注册、`/profile/benefits`、`/pay/wechat/prepay` 和 `wx.requestPayment`。
|
||||
|
||||
验收:
|
||||
|
||||
- `npm run build`(`backend/`):PASS。
|
||||
- `node scripts/check-miniapp-m08-a.mjs`:PASS。
|
||||
- `node tests/member-profile-service.test.mjs`:PASS。
|
||||
- `node tests/member-profile-route.test.mjs`:PASS。
|
||||
- `node tests/marketing-benefit-service.test.mjs`:PASS。
|
||||
- `npm test`(`backend/`):PASS。
|
||||
- `powershell -ExecutionPolicy Bypass -File scripts\dev\windows\test-all.ps1`:PASS。
|
||||
|
||||
状态:
|
||||
|
||||
- M08-A 仍为 `PARTIAL`;充值微信支付调起、余额/套餐/优惠券下单抵扣深度集成、真机合法域名、真实微信支付和实物开门验证待继续。
|
||||
|
||||
提交:
|
||||
|
||||
- 工程提交:`6cb3d2d`
|
||||
- 远端校验:待本轮 push 后执行 `HEAD == origin/main`。
|
||||
|
||||
Reference in New Issue
Block a user