fix(user-center): 去除余额金额显示前¥符号
This commit is contained in:
1 parent
175d32f01e
commit
098df7f921
3 files changed
+7
-5
No files matched your search
@@ -694,7 +694,7 @@
|
|||||||
body += '<div class="mb10 muted-box padding-h10 aksrt-cashier__balance" data-aksrt-balance-box' + (balanceSelected ? '' : ' hidden') + '>' +
|
body += '<div class="mb10 muted-box padding-h10 aksrt-cashier__balance" data-aksrt-balance-box' + (balanceSelected ? '' : ' hidden') + '>' +
|
||||||
'<div class="flex jsb ac"><span class="muted-2-color">' +
|
'<div class="flex jsb ac"><span class="muted-2-color">' +
|
||||||
'<i class="fa fas fa-wallet aksrt-cashier__asset-icon" aria-hidden="true"></i>我的余额' +
|
'<i class="fa fas fa-wallet aksrt-cashier__asset-icon" aria-hidden="true"></i>我的余额' +
|
||||||
'</span><div class="c-blue-2"><span class="em14">¥' + escapeHtml(walletBal) + '</span></div></div>';
|
'</span><div class="c-blue-2"><span class="em14">' + escapeHtml(walletBal) + '</span></div></div>';
|
||||||
if (preview.balance_enough === false) {
|
if (preview.balance_enough === false) {
|
||||||
if (preview.credits_url) {
|
if (preview.credits_url) {
|
||||||
body += '<a class="but c-red block mt6 aksrt-cashier__recharge" href="' + escapeAttr(preview.credits_url) + '">' +
|
body += '<a class="but c-red block mt6 aksrt-cashier__recharge" href="' + escapeAttr(preview.credits_url) + '">' +
|
||||||
|
|||||||
@@ -77,7 +77,9 @@ $mark = (string) ($charge_view['currency_mark'] ?? '元');
|
|||||||
</div>
|
</div>
|
||||||
<div class="uc-asset-card__body flex jsb ac">
|
<div class="uc-asset-card__body flex jsb ac">
|
||||||
<div class="uc-asset-card__amount c-blue-2">
|
<div class="uc-asset-card__amount c-blue-2">
|
||||||
<span class="uc-asset-card__mark px12"><?php echo esc_html($mark === '元' ? '¥' : $mark); ?></span>
|
<?php if (!in_array($mark, ['', '元', '¥'], true)) : ?>
|
||||||
|
<span class="uc-asset-card__mark px12"><?php echo esc_html($mark); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
<span class="uc-asset-card__value font-bold" data-aksrt-wallet-value title="<?php echo esc_attr($wallet_fmt); ?>"><?php echo esc_html($wallet_fmt); ?></span>
|
<span class="uc-asset-card__value font-bold" data-aksrt-wallet-value title="<?php echo esc_attr($wallet_fmt); ?>"><?php echo esc_html($wallet_fmt); ?></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="uc-asset-card__actions flex0">
|
<div class="uc-asset-card__actions flex0">
|
||||||
@@ -137,8 +139,8 @@ $mark = (string) ($charge_view['currency_mark'] ?? '元');
|
|||||||
?>
|
?>
|
||||||
<label class="uc-charge-package<?php echo $idx === 0 ? ' is-active' : ''; ?>">
|
<label class="uc-charge-package<?php echo $idx === 0 ? ' is-active' : ''; ?>">
|
||||||
<input type="radio" name="balance_package" value="<?php echo esc_attr((string) $pkg['key']); ?>" <?php checked($idx === 0); ?>>
|
<input type="radio" name="balance_package" value="<?php echo esc_attr((string) $pkg['key']); ?>" <?php checked($idx === 0); ?>>
|
||||||
<div class="uc-charge-package__credit"><span class="px12">¥</span><?php echo esc_html((string) $pkg['price']); ?></div>
|
<div class="uc-charge-package__credit"><?php echo esc_html((string) $pkg['price']); ?></div>
|
||||||
<div class="uc-charge-package__pay c-red"><span class="px12">¥</span><?php echo esc_html((string) $pkg['pay_price']); ?>
|
<div class="uc-charge-package__pay c-red"><?php echo esc_html((string) $pkg['pay_price']); ?>
|
||||||
<?php if ($package_saving_minor > 0) : ?>
|
<?php if ($package_saving_minor > 0) : ?>
|
||||||
<span class="ml6 c-yellow smail"><?php printf(esc_html__('省%s', 'aksrt'), esc_html(\AKSRT\Ledger\AssetAmount::decimal_from_minor($package_saving_minor))); ?></span>
|
<span class="ml6 c-yellow smail"><?php printf(esc_html__('省%s', 'aksrt'), esc_html(\AKSRT\Ledger\AssetAmount::decimal_from_minor($package_saving_minor))); ?></span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -153,7 +155,6 @@ $mark = (string) ($charge_view['currency_mark'] ?? '元');
|
|||||||
<?php if ($custom_s) : ?>
|
<?php if ($custom_s) : ?>
|
||||||
<div class="muted-color mt16 mb6"><?php echo $packages ? esc_html__('自定义充值金额', 'aksrt') : esc_html__('请输入充值金额', 'aksrt'); ?></div>
|
<div class="muted-color mt16 mb6"><?php echo $packages ? esc_html__('自定义充值金额', 'aksrt') : esc_html__('请输入充值金额', 'aksrt'); ?></div>
|
||||||
<div class="uc-charge-custom flex ac">
|
<div class="uc-charge-custom flex ac">
|
||||||
<span class="mr10 muted-color">¥</span>
|
|
||||||
<input type="number" class="uc-charge-custom__input" name="custom_price" min="1" max="<?php echo esc_attr((string) $custom_limit); ?>" step="0.01" placeholder="1 ~ <?php echo esc_attr((string) $custom_limit); ?>">
|
<input type="number" class="uc-charge-custom__input" name="custom_price" min="1" max="<?php echo esc_attr((string) $custom_limit); ?>" step="0.01" placeholder="1 ~ <?php echo esc_attr((string) $custom_limit); ?>">
|
||||||
</div>
|
</div>
|
||||||
<?php if (!$packages) : ?>
|
<?php if (!$packages) : ?>
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ test('asset card amounts expose the full value via title tooltips', () => {
|
|||||||
assert.match(wallet, /data-aksrt-wallet-value[^>]*title="/)
|
assert.match(wallet, /data-aksrt-wallet-value[^>]*title="/)
|
||||||
assert.match(balance, /data-aksrt-points-value[^>]*data-credits-value[^>]*title="/)
|
assert.match(balance, /data-aksrt-points-value[^>]*data-credits-value[^>]*title="/)
|
||||||
assert.match(amount, /number_format_i18n\(intdiv\(\$this->minor, 100\)\)/)
|
assert.match(amount, /number_format_i18n\(intdiv\(\$this->minor, 100\)\)/)
|
||||||
|
assert.doesNotMatch(wallet, /\$mark === '元' \? '¥'/)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('removed asset card selectors do not return in loaded user-center styles', () => {
|
test('removed asset card selectors do not return in loaded user-center styles', () => {
|
||||||
|
|||||||
Reference in new issue
Block a user