feat(pay): 卡密兑换入口收敛到三个购买弹窗并对齐参考主题

- 移除余额卡片独立「卡密兑换」通用弹窗,兑换入口分布到充值/积分/会员三个弹窗的支付方式中
- 充值弹窗补齐卡密 logo 与仅卡密时的金额选择隐藏逻辑
- 积分购买弹窗 1:1 复刻参考主题 points-pay modal(商品档位/自定义/支付方式/立即支付),REST 改为 product+custom 契约
- 会员弹窗注入卡密渠道:视图模型透传 card_pass,前端渲染卡密盒并直兑 /pay/card-pass/redeem type=vip
- 后台卡密兑换拆分为余额/积分/会员三个独立开关,VIP 段旧会员卡密组清理
- REST type 改为必填(balance/vip/credits),三类型独立闸门
- 测试重写为 card-pass-modal-redeem 契约,321 项全部通过
This commit is contained in:
kate522 committed 2026-09-18 12:25:18 +08:00
1 parent 74e43aaa76
commit b88eab0bfe
18 files changed
+746 -472

No files matched your search

+4
View File
@@ -64,6 +64,9 @@ trait VipServiceModal {
}
$points_exchange = is_array($catalog['points_exchange'] ?? null) ? $catalog['points_exchange'] : [];
$methods = is_array($catalog['payment_methods'] ?? null) ? $catalog['payment_methods'] : [];
$card_pass = is_array($catalog['card_pass'] ?? null)
? array_merge(['enabled' => false, 'desc' => '', 'only_password' => false], $catalog['card_pass'])
: ['enabled' => false, 'desc' => '', 'only_password' => false];
$no_payment_method = $methods === [];
$action_reasons = [
'purchase' => $no_payment_method
@@ -124,6 +127,7 @@ trait VipServiceModal {
],
'levels' => $level_view,
'payment_methods' => $methods,
'card_pass' => $card_pass,
'allowed_actions' => [
'purchase' => $package_ids !== [] && $methods !== [],
'renew' => $has_renew && $methods !== [],