feat(users): normalize center routes and withdrawal limits

This commit is contained in:
kate522 committed 2026-08-12 19:44:47 +08:00
1 parent 9004f7093f
commit dacd0095bf
24 files changed
+326 -174

No files matched your search

@@ -1,19 +1,14 @@
<?php
/**
* Shared balance withdrawal modal.
*
* @package AKSRT
*/
/** Shared balance withdrawal modal. @package AKSRT */
defined('ABSPATH') || exit;
if (!empty($GLOBALS['aksrt_withdraw_modal_rendered'])) {
return;
}
$GLOBALS['aksrt_withdraw_modal_rendered'] = true;
$withdraw_min = max(1, (float) ($withdraw_min ?? 50));
$wallet_fmt = (string) ($wallet_fmt ?? '0.00');
$withdraw_min = max(0, (float) ($withdraw_min ?? 50));
$withdraw_usage = is_array($withdraw_usage ?? null) ? $withdraw_usage : ['remaining_count' => 0, 'remaining_amount' => 0];
$withdraw_fee_rate = (int) ($withdraw_settings['service_charge_rate'] ?? 5);
?>
<div class="uc-modal" id="aksrt-withdraw-modal" hidden data-aksrt-withdraw-modal>
<div class="uc-modal__overlay" data-aksrt-withdraw-close></div>
@@ -22,16 +17,16 @@ $wallet_fmt = (string) ($wallet_fmt ?? '0.00');
<h3 class="uc-modal__title"><?php esc_html_e('余额提现', 'aksrt'); ?></h3>
<form data-aksrt-withdraw-form>
<label class="muted-color em09"><?php esc_html_e('提现金额', 'aksrt'); ?></label>
<input type="number" class="uc-card-pass__input" name="amount" min="<?php echo esc_attr((string) $withdraw_min); ?>" step="0.01" data-aksrt-withdraw-amount>
<p class="muted-2-color em09 mt6"><?php printf(esc_html__('最低提现 %s 元,当前余额 %s', 'aksrt'), esc_html((string) $withdraw_min), esc_html($wallet_fmt)); ?></p>
<input type="number" class="uc-card-pass__input" name="amount" min="<?php echo esc_attr((string) $withdraw_min); ?>" max="<?php echo esc_attr((string) ($withdraw_usage['remaining_amount'] ?? 0)); ?>" step="1" inputmode="numeric" data-aksrt-withdraw-amount data-withdraw-min="<?php echo esc_attr((string) $withdraw_min); ?>" data-withdraw-remaining-amount="<?php echo esc_attr((string) ($withdraw_usage['remaining_amount'] ?? 0)); ?>" data-withdraw-remaining-count="<?php echo esc_attr((string) ($withdraw_usage['remaining_count'] ?? 0)); ?>">
<p class="muted-2-color em09 mt6"><?php printf(esc_html__('最低提现%s 元,今日可提现%d次,提现手续费率%d%%', 'aksrt'), esc_html((string) $withdraw_min), (int) ($withdraw_usage['remaining_count'] ?? 0), $withdraw_fee_rate); ?></p>
<label class="muted-color em09 mt10"><?php esc_html_e('收款方式', 'aksrt'); ?></label>
<select class="uc-card-pass__input" name="method" data-aksrt-withdraw-method>
<option value="alipay"><?php esc_html_e('支付宝', 'aksrt'); ?></option>
<option value="wechat"><?php esc_html_e('微信', 'aksrt'); ?></option>
<option value="bank"><?php esc_html_e('银行卡', 'aksrt'); ?></option>
</select>
<label class="muted-color em09 mt10"><?php esc_html_e('收款账号信息', 'aksrt'); ?></label>
<textarea class="uc-card-pass__input" name="account" rows="3" data-aksrt-withdraw-account placeholder="<?php esc_attr_e('姓名 + 账号 / 卡号', 'aksrt'); ?>"></textarea>
<label class="muted-color em09 mt10"><?php esc_html_e('收款账户信息', 'aksrt'); ?></label>
<textarea class="uc-card-pass__input" name="account" rows="3" data-aksrt-withdraw-account placeholder="<?php esc_attr_e('姓名 + 账户 / 卡号', 'aksrt'); ?>"></textarea>
<p class="uc-modal__tip" data-aksrt-withdraw-tip></p>
<button type="submit" class="but jb-blue btn-block" data-aksrt-withdraw-submit><?php esc_html_e('提交申请', 'aksrt'); ?></button>
</form>