Files
wordpress-theme-aksrt/inc/helpers/user-center-renderers/withdraw-modal.php
T
kate522andClaude Opus 5 35bb96e82f refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.

Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
  cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
  window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)

Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
  so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
  (dropped 3 stale entries, added the 17 missing ones)

Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
  get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
  when it is empty

Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.

Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-01 20:05:04 +08:00

42 lines
3.0 KiB
PHP

<?php
/** Shared balance withdrawal modal. @package Jio */
defined('ABSPATH') || exit;
if (!empty($GLOBALS['jio_withdraw_modal_rendered'])) {
return;
}
$GLOBALS['jio_withdraw_modal_rendered'] = true;
try {
$withdraw_min = \Jio\Ledger\AssetAmount::balance(is_string($withdraw_min ?? null) ? $withdraw_min : '')->decimal();
} catch (\InvalidArgumentException $e) {
$withdraw_min = '0.00';
}
$withdraw_usage = is_array($withdraw_usage ?? null) ? $withdraw_usage : ['remaining_count' => 0, 'remaining_amount' => '0.00'];
$withdraw_fee_rate = (int) ($withdraw_settings['service_charge_rate'] ?? 5);
$withdraw_channels = array_values(array_intersect(['alipay', 'wechat'], (array) ($withdraw_settings['payout_channels'] ?? ['alipay', 'wechat'])));
if (!$withdraw_channels) {
$withdraw_channels = ['alipay', 'wechat'];
}
?>
<div class="uc-modal" id="jio-withdraw-modal" hidden data-jio-withdraw-modal>
<div class="uc-modal__overlay" data-jio-withdraw-close></div>
<div class="uc-modal__dialog" role="dialog" aria-modal="true">
<button type="button" class="uc-modal__close" data-jio-withdraw-close aria-label="<?php esc_attr_e('关闭', 'jio'); ?>"><i class="fa fas fa-times" aria-hidden="true"></i></button>
<h3 class="uc-modal__title"><?php esc_html_e('余额提现', 'jio'); ?></h3>
<form data-jio-withdraw-form>
<label class="muted-color em09"><?php esc_html_e('提现金额', 'jio'); ?></label>
<input type="number" class="uc-card-pass__input" name="amount" min="<?php echo esc_attr($withdraw_min); ?>" max="<?php echo esc_attr((string) ($withdraw_usage['remaining_amount'] ?? '0.00')); ?>" step="0.01" inputmode="decimal" data-jio-withdraw-amount data-withdraw-min="<?php echo esc_attr($withdraw_min); ?>" data-withdraw-remaining-amount="<?php echo esc_attr((string) ($withdraw_usage['remaining_amount'] ?? '0.00')); ?>" 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%%', 'jio'), esc_html($withdraw_min), (int) ($withdraw_usage['remaining_count'] ?? 0), $withdraw_fee_rate); ?></p>
<label class="muted-color em09 mt10"><?php esc_html_e('收款方式', 'jio'); ?></label>
<select class="uc-card-pass__input" name="method" data-jio-withdraw-method>
<?php foreach ($withdraw_channels as $channel) : ?>
<option value="<?php echo esc_attr($channel); ?>"><?php echo esc_html($channel === 'wechat' ? __('微信收款码', 'jio') : __('支付宝收款码', 'jio')); ?></option>
<?php endforeach; ?>
</select>
<label class="muted-color em09 mt10"><?php esc_html_e('收款账户信息', 'jio'); ?></label>
<textarea class="uc-card-pass__input" name="account" rows="3" data-jio-withdraw-account placeholder="<?php esc_attr_e('姓名 + 账户 / 卡号', 'jio'); ?>"></textarea>
<button type="submit" class="but jb-blue btn-block" data-jio-withdraw-submit><?php esc_html_e('提交申请', 'jio'); ?></button>
</form>
</div>
</div>