feat(server/pay): catalog 加全员优惠月付 pro_month_promo(¥6/$1)+ Promo 标记
优惠档全员可见,客户端用特殊卡片展示;pay 侧需种同 biz_code 商品后方可真下单 (未种前 product_not_found→404,UI 先就绪)。catalog 测试更新为 4 档 + promo 断言。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -286,9 +286,14 @@ func TestCatalog(t *testing.T) {
|
||||
Items []CatalogItem `json:"items"`
|
||||
}
|
||||
_ = json.Unmarshal(w.Body.Bytes(), &resp)
|
||||
if len(resp.Items) != 3 || resp.Items[0].SKU != "pro_month" {
|
||||
if len(resp.Items) != 4 || resp.Items[0].SKU != "pro_month_promo" {
|
||||
t.Fatalf("catalog = %+v", resp.Items)
|
||||
}
|
||||
// 优惠档:全员可见,promo 标记 + ¥6/$1 展示价。
|
||||
promo := resp.Items[0]
|
||||
if !promo.Promo || promo.PriceMinor != 600 || promo.PriceUsdtMicro != 1000000 {
|
||||
t.Fatalf("promo item 不符: %+v", promo)
|
||||
}
|
||||
}
|
||||
|
||||
// 老 created 单超 TTL → 列表视图显 expired;近期 created → 仍 created。
|
||||
|
||||
Reference in New Issue
Block a user