fix(pay): 多渠道时支付方式图标不再被 flex 压缩变形
用户配置 5-6 个收款渠道时(400px modal-mini 内 6 项),方法行项目
被 flex 压缩导致图标变形:方形 logo 被压至 31px/22px,宽形 stripe
logo(2468:1024)被压成 35px 方形。经无头 Chrome 几何实证,参考主题
同场景存在完全相同的缺陷(两主题 main.css 该组件逐条一致),属 Zibll
组件固有问题而非复刻偏差;按用户要求修复且不改变正常场景视觉:
- main.css:.payment-method-radio img 增加 flex:none(图标恒为固
有比例宽,高 35px 不变);main.min.css 经 build-public-assets 重建
- 三个弹窗方法行加 hh(.flex.hh{flex-wrap:wrap}):空间不足时整行
换行而非压缩图标——充值/积分(服务端模板)与会员(pay-vip.js)
三处同步
- 契约测试锁定 img flex:none 与三处行标记(322 项全部通过)
- 验证:无头 Chrome 实测 6 渠道 370/360/330/300px 容器下全部图标
恒定固有比例宽度,行自动换行
This commit is contained in:
@@ -5695,6 +5695,10 @@ body:has(.modal.in) .float-btn,
|
||||
|
||||
.payment-method-radio img {
|
||||
height: 35px;
|
||||
/* 多渠道窄容器时禁止 flex 压缩图标导致变形(参考主题同场景存在
|
||||
此缺陷,实测 6 渠道 360px 容器图标被压至 31px;flex:none 后图标
|
||||
恒为 35px,行溢出由方法行 hh 换行承接,正常场景视觉不变)。 */
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.payment-method-radio + .payment-method-radio {
|
||||
|
||||
Vendored
+1
-2
File diff suppressed because one or more lines are too long
@@ -135,7 +135,7 @@
|
||||
// 与余额充值/购买积分弹窗完全一致的组件)。
|
||||
if (methods.length > 1) {
|
||||
append(parent, node("div", "muted-2-color em09 mb6", "请选择支付方式"));
|
||||
var row = node("div", "flex mb10");
|
||||
var row = node("div", "flex hh mb10");
|
||||
methods.forEach(function (method, index) {
|
||||
var id = text(method.id || "balance");
|
||||
var item = node("div", "flex jc hh payment-method-radio hollow-radio flex-auto pointer" + (index === 0 ? " active" : ""));
|
||||
|
||||
@@ -123,7 +123,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
|
||||
<div class="dependency-box">
|
||||
<?php if (count($points_methods) > 1) : ?>
|
||||
<div class="muted-2-color em09 mb6"><?php esc_html_e('请选择支付方式', 'aksrt'); ?></div>
|
||||
<div class="flex mb10">
|
||||
<div class="flex hh mb10">
|
||||
<?php foreach ($points_methods as $pmi => $pm) :
|
||||
$pm_id = (string) ($pm['id'] ?? '');
|
||||
$pm_logo = 'card_pass' === $pm_id ? 'pay-card-pass-logo.svg' : 'pay-balance-logo.svg';
|
||||
|
||||
@@ -180,7 +180,7 @@ $charge_custom_block = static function () use ($mark, $charge_mark_html, $charge
|
||||
<div class="dependency-box">
|
||||
<?php if (count($methods) > 1) : ?>
|
||||
<div class="muted-2-color em09 mb6"><?php esc_html_e('请选择支付方式', 'aksrt'); ?></div>
|
||||
<div class="flex mb10">
|
||||
<div class="flex hh mb10">
|
||||
<?php foreach ($methods as $mi => $m) :
|
||||
$method_id = (string) ($m['id'] ?? '');
|
||||
$method_logo = $charge_method_logos[$method_id] ?? '';
|
||||
|
||||
@@ -31,14 +31,14 @@ const chargeCard = read('src', 'Payment', 'ChargeCard.php');
|
||||
const userOrders = read('src', 'Payment', 'UserOrders.php');
|
||||
const vipPackages = read('src', 'Content', 'VipServicePackages.php');
|
||||
const aksrtPay = read('inc', 'helpers', 'aksrt-pay.php');
|
||||
const mainCss = read('assets', 'css', 'main.css');
|
||||
const vipPurchase = read('src', 'Content', 'VipServicePurchase.php');
|
||||
const vipModal = read('src', 'Content', 'VipServiceModal.php');
|
||||
const schemaPhp = read('src', 'Admin', 'Schema', 'SchemaPayment.php');
|
||||
const schemaJs = read('assets', 'admin', 'src', 'schema', 'sections', 'payment', 'recharge.js');
|
||||
const vipSchemaJs = read('assets', 'admin', 'src', 'schema', 'sections', 'payment', 'vip.js');
|
||||
|
||||
test('独立入口与通用弹窗已删除', () => {
|
||||
assert.equal(
|
||||
test('独立入口与通用弹窗已删除', () => { assert.equal(
|
||||
fs.existsSync(path.join(root, 'inc', 'helpers', 'user-center-renderers', 'credits-vip.php')),
|
||||
false,
|
||||
'credits-vip.php 死文件应已删除'
|
||||
@@ -201,3 +201,13 @@ test('核销订单契约:金额恒为 0,订单名称按 note 生成', () =>
|
||||
assert.match(userOrders, /购入\[%1\$s\]%2\$s/);
|
||||
assert.match(userOrders, /永久/);
|
||||
});
|
||||
|
||||
test('多渠道防挤压:图标 flex:none + 方法行 hh 换行(三弹窗一致)', () => {
|
||||
// 图标禁用 flex 压缩(参考主题同场景存在变形缺陷,实测 6 渠道 360px
|
||||
// 容器图标被压至 31px、宽形 stripe 被压成 35px 方形)。
|
||||
assert.match(mainCss, /\.payment-method-radio img \{[^}]*height:\s*35px;[^}]*flex:\s*none;/s);
|
||||
// 方法行启用 hh 换行(.flex.hh{flex-wrap:wrap}),放不下时整行换行。
|
||||
assert.match(wallet, /class="flex hh mb10"/);
|
||||
assert.match(creditsRenderer, /class="flex hh mb10"/);
|
||||
assert.match(payVipJs, /node\("div", "flex hh mb10"\)/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user