fix(pay): 会员卡密单密码默认关闭,卡密盒与其他弹窗一致显示卡号+密码
会员购买/续费弹窗卡密盒此前仅显示卡密输入,与其他两个弹窗(卡号+密码) 不一致。根因是 pay_vip_pass_charge_only_password 的默认值偏离参考主题: - PaymentRuntime:vip 类型 only_password 由「未设置即视为开启」改为 !empty(),与其他两类型同构(参考主题 default false) - ChargeCard:get_public_options 的 vip 回退值 only_password true→false - SchemaPayment + recharge.js:会员卡密单密码模式开关 default true→false - 契约测试同步锁定默认关闭与无 isset 回退 - admin SPA 重新构建 已保存过设置且该键被持久化为开启的站点,需在后台「余额充值 → 卡密 兑换 → 会员卡密单密码模式」手动关闭一次。
This commit is contained in:
@@ -146,7 +146,11 @@ test('REST 契约:type 必填(balance/vip/credits),无空类型自动识
|
||||
test('后端类型闸门:三个独立开关各约束自己的类型', () => {
|
||||
assert.match(chargeCard, /'balance' => \['enabled' => false, 'desc' => '', 'only_password' => false\]/);
|
||||
assert.match(chargeCard, /'credits' => \['enabled' => false, 'desc' => '', 'only_password' => false\]/);
|
||||
assert.match(chargeCard, /'vip'\s+=> \['enabled' => false, 'desc' => '', 'only_password' => true\]/);
|
||||
assert.match(chargeCard, /'vip'\s+=> \['enabled' => false, 'desc' => '', 'only_password' => false\]/);
|
||||
// 会员单密码默认关闭(对齐参考主题 default false):未显式开启时卡密盒显示卡号+密码。
|
||||
assert.doesNotMatch(chargeCard, /'only_password' => true/);
|
||||
assert.match(read('src', 'Settings', 'PaymentRuntime.php'), /'only_password' => !empty\(\$settings\['pay_vip_pass_charge_only_password'\]\),/);
|
||||
assert.doesNotMatch(read('src', 'Settings', 'PaymentRuntime.php'), /!isset\(\$settings\['pay_vip_pass_charge_only_password'\]\)/);
|
||||
assert.match(chargeCard, /卡密兑换余额功能未开启/);
|
||||
assert.match(chargeCard, /卡密兑换积分功能未开启/);
|
||||
assert.match(chargeCard, /卡密兑换会员功能未开启/);
|
||||
|
||||
Reference in New Issue
Block a user