Files
pangolin/docs/pay-v2-dev-log.md
T
wangjia f6ce5267d5 feat(design): 支付渠道 switch 原型 + segswitch 原子 + 图标/语言同源闸
- .segswitch 段控原子入 atoms.css + 登记 index.html
- purchase/ui-mobile/ui-desktop 三屏:购买页支付渠道 switch(USDT→crypto 默认 / 人民币→alipay),套餐价随渠道分币种显示,删两步弹层 + nezha
- 订单列表/详情集成进移动+桌面主框架
- icons.js 58 图标 sprite 单源 + gen_flutter_icons codegen + check-l1-sync 同源闸(图标同集 + l10n 完整)
- pay-v2 开发决策日志 docs/pay-v2-dev-log.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
2026-07-11 23:45:55 +08:00

29 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# pay v2 支付+订单 — 自动开发决策日志
> 2026-07-11 起,自动模式落地。用户明早 double check。每个决断记这里。
## 背景
用户指令:把今天设计的支付/订单功能全部落成真实代码(Flutter + Go),前后端测试,增量提交,自行决断,留记录。
## 最终 UX 模型(prototype 已定稿)
- 购买页一个**支付渠道 segswitch**:默认 **USDT→加密货币**,可切 **人民币→支付宝**。渠道=币种=方式,一步定,无弹层。
- 套餐价随渠道切换(一口价不换算):月 ¥29.99/$4.99 · 季 ¥68.88/$12.99 · 年 ¥199.99/$34.99。
- 买完直达支付页:crypto=USDT 地址+精确金额;alipay=桌面二维码/移动拉起 App。
- 订单:列表→详情,状态 pending/paid/settled/expired。
- nezha(哪吒)已从购买流程移除。
## 决策日志
- **[step0]** prototype 支付渠道 switch 收口(3 屏 + `.segswitch` 原子入真相源+登记)。→ 提交后进开发。
## [step1] prototype 支付渠道 switch 收口(2026-07-11
- `.segswitch` 原子入 atoms.css + 登记 index.htmlpurchase.html/ui-mobile/ui-desktop 三屏改成购买页渠道 switch(默认 USDT→crypto / 人民币→alipay),删两步弹层 + nezha。
- 闸全绿:check-ds 5 项 / check-l1-sync58 图标 + 190 l10n×6)。
## [step2] 服务端 pay orders + 分币种 catalog2026-07-11
- catalog.go`CatalogItem.PriceUsdtMicro`USDT 展示价,一口价)+ `SettlementCurrency`/`DisplayAmountMinor` helpercrypto→USDT / 法币→CNY)。
- store.go`PurchaseRow.CreatedAt``Insert` 增 amount/currency 参(下单落展示金额,webhook 覆盖实际);新增 `ListByUser`
- handler.go:新增 `List`GET /v1/pay/orders,纯本地台账倒序)+ `orderView` 富字段;`GetOrder` 详情回带 sku/plan/method/amount/currency/created_at/paid_at;下单按方式落展示金额。
- main.go:注册 `GET /v1/pay/orders`
- 测试:新增 List 越权/倒序/富字段、下单展示金额分币种、详情富字段;**修 3 个 pre-existing 迁移测试**renumber 21→23 遗留)。`go test ./...` 全绿。
- 决策:USDT 展示价放服务端 catalog$4.99/$12.99/$34.99),客户端 switch 直接读,不硬编码;实际扣款仍以 pay 侧为准。