Merge pull request 'fix(credits): align asset actions and withdrawal settings' (#10) from worktree/balance-points-exchange into main
Reviewed-on: #10
This commit is contained in:
commit
4cc1f2b2ea
4 files changed
+14
-23
No files matched your search
@@ -25,7 +25,6 @@ export const rechargeSchema = {
|
|||||||
pay_balance_points_exchange_min_points: 100,
|
pay_balance_points_exchange_min_points: 100,
|
||||||
pay_balance_points_exchange_daily_max_points: 100000,
|
pay_balance_points_exchange_daily_max_points: 100000,
|
||||||
pay_balance_points_exchange_desc: '',
|
pay_balance_points_exchange_desc: '',
|
||||||
pay_balance_withdraw_s: false,
|
|
||||||
},
|
},
|
||||||
groups: [
|
groups: [
|
||||||
{
|
{
|
||||||
@@ -91,13 +90,5 @@ export const rechargeSchema = {
|
|||||||
{ key: 'pay_balance_points_exchange_desc', label: '兑换说明', type: 'textarea', default: '', dependsOn: { key: 'pay_balance_points_exchange_s', value: true } },
|
{ key: 'pay_balance_points_exchange_desc', label: '兑换说明', type: 'textarea', default: '', dependsOn: { key: 'pay_balance_points_exchange_s', value: true } },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'withdraw',
|
|
||||||
title: '余额提现',
|
|
||||||
icon: 'fas fa-hand-holding-usd',
|
|
||||||
fields: [
|
|
||||||
{ key: 'pay_balance_withdraw_s', label: '启用余额提现', type: 'switch', default: false, dependsOn: { key: 'pay_balance_s', value: true } },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ export const withdrawalSchema = {
|
|||||||
icon: 'fas fa-hand-holding-usd',
|
icon: 'fas fa-hand-holding-usd',
|
||||||
description: '配置提现门槛、手续费比例与每日限制。',
|
description: '配置提现门槛、手续费比例与每日限制。',
|
||||||
defaults: {
|
defaults: {
|
||||||
|
pay_balance_withdraw_s: false,
|
||||||
pay_rebate_withdraw_lowest_money: 50,
|
pay_rebate_withdraw_lowest_money: 50,
|
||||||
withdraw_service_charge: 5,
|
withdraw_service_charge: 5,
|
||||||
withdraw_daily_count: 3,
|
withdraw_daily_count: 3,
|
||||||
@@ -16,11 +17,12 @@ export const withdrawalSchema = {
|
|||||||
title: '提现设置',
|
title: '提现设置',
|
||||||
icon: 'fas fa-sliders-h',
|
icon: 'fas fa-sliders-h',
|
||||||
fields: [
|
fields: [
|
||||||
{ key: 'pay_rebate_withdraw_lowest_money', label: '最低提现金额', type: 'number', default: 50, min: 0, max: 99999 },
|
{ key: 'pay_balance_withdraw_s', label: '启用余额提现', type: 'switch', default: false },
|
||||||
{ key: 'withdraw_service_charge', label: '提现手续费(%)', type: 'number', default: 5, min: 0, max: 50 },
|
{ key: 'pay_rebate_withdraw_lowest_money', label: '最低提现金额', type: 'number', default: 50, min: 0, max: 99999, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
|
||||||
{ key: 'withdraw_daily_count', label: '每日可提现次数', type: 'number', default: 3, min: 0, max: 99999 },
|
{ key: 'withdraw_service_charge', label: '提现手续费(%)', type: 'number', default: 5, min: 0, max: 50, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
|
||||||
{ key: 'withdraw_daily_limit', label: '每日提现上限', type: 'number', default: 50, min: 0, max: 999999 },
|
{ key: 'withdraw_daily_count', label: '每日可提现次数', type: 'number', default: 3, min: 0, max: 99999, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
|
||||||
{ key: 'withdraw_reset_time', label: '重置时间', type: 'input', default: '00:00', help: '按站点 WordPress 时区重置,格式 HH:MM。' },
|
{ key: 'withdraw_daily_limit', label: '每日提现上限', type: 'number', default: 50, min: 0, max: 999999, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
|
||||||
|
{ key: 'withdraw_reset_time', label: '重置时间', type: 'input', default: '00:00', help: '按站点 WordPress 时区重置,格式 HH:MM。', dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ $currency = (string) ($currency_name ?? __('积分', 'aksrt'));
|
|||||||
<button type="button" class="but c-green mr6 hollow" data-aksrt-transfer-open="points" data-aksrt-transfer-min="<?php echo esc_attr((string) $points_transfer_min); ?>"><?php esc_html_e('转账', 'aksrt'); ?></button>
|
<button type="button" class="but c-green mr6 hollow" data-aksrt-transfer-open="points" data-aksrt-transfer-min="<?php echo esc_attr((string) $points_transfer_min); ?>"><?php esc_html_e('转账', 'aksrt'); ?></button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($points_exchange_on) : ?>
|
<?php if ($points_exchange_on) : ?>
|
||||||
<button type="button" class="but c-green" data-aksrt-points-exchange-open><?php esc_html_e('购买积分', 'aksrt'); ?></button>
|
<button type="button" class="but c-green hollow" data-aksrt-points-exchange-open><?php esc_html_e('购买积分', 'aksrt'); ?></button>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,9 +53,6 @@ class SchemaPayment {
|
|||||||
['key' => 'pay_balance_points_exchange_daily_max_points', 'label' => '每日最高购买积分', 'type' => 'number', 'default' => 100000, 'min' => 1, 'max' => 10000000, 'dependsOn' => ['key' => 'pay_balance_points_exchange_s', 'value' => true]],
|
['key' => 'pay_balance_points_exchange_daily_max_points', 'label' => '每日最高购买积分', 'type' => 'number', 'default' => 100000, 'min' => 1, 'max' => 10000000, 'dependsOn' => ['key' => 'pay_balance_points_exchange_s', 'value' => true]],
|
||||||
['key' => 'pay_balance_points_exchange_desc', 'label' => '兑换说明', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'pay_balance_points_exchange_s', 'value' => true]],
|
['key' => 'pay_balance_points_exchange_desc', 'label' => '兑换说明', 'type' => 'textarea', 'default' => '', 'dependsOn' => ['key' => 'pay_balance_points_exchange_s', 'value' => true]],
|
||||||
]],
|
]],
|
||||||
['key' => 'withdraw', 'title' => '余额提现', 'fields' => [
|
|
||||||
['key' => 'pay_balance_withdraw_s', 'label' => '启用余额提现', 'type' => 'switch', 'default' => false, 'dependsOn' => ['key' => 'pay_balance_s', 'value' => true]],
|
|
||||||
]],
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'vip' => [
|
'vip' => [
|
||||||
@@ -329,11 +326,12 @@ class SchemaPayment {
|
|||||||
'option_key' => 'aksrt_settings',
|
'option_key' => 'aksrt_settings',
|
||||||
'groups' => [
|
'groups' => [
|
||||||
['key' => 'basic', 'title' => '提现设置', 'fields' => [
|
['key' => 'basic', 'title' => '提现设置', 'fields' => [
|
||||||
['key' => 'pay_rebate_withdraw_lowest_money', 'label' => '最低提现金额', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 99999],
|
['key' => 'pay_balance_withdraw_s', 'label' => '启用余额提现', 'type' => 'switch', 'default' => false],
|
||||||
['key' => 'withdraw_service_charge', 'label' => '提现手续费(%)', 'type' => 'number', 'default' => 5, 'min' => 0, 'max' => 50],
|
['key' => 'pay_rebate_withdraw_lowest_money', 'label' => '最低提现金额', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 99999, 'dependsOn' => ['key' => 'pay_balance_withdraw_s', 'value' => true]],
|
||||||
['key' => 'withdraw_daily_count', 'label' => '每日可提现次数', 'type' => 'number', 'default' => 3, 'min' => 0, 'max' => 99999, 'sanitize_type' => 'int'],
|
['key' => 'withdraw_service_charge', 'label' => '提现手续费(%)', 'type' => 'number', 'default' => 5, 'min' => 0, 'max' => 50, 'dependsOn' => ['key' => 'pay_balance_withdraw_s', 'value' => true]],
|
||||||
['key' => 'withdraw_daily_limit', 'label' => '每日提现上限', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 999999],
|
['key' => 'withdraw_daily_count', 'label' => '每日可提现次数', 'type' => 'number', 'default' => 3, 'min' => 0, 'max' => 99999, 'sanitize_type' => 'int', 'dependsOn' => ['key' => 'pay_balance_withdraw_s', 'value' => true]],
|
||||||
['key' => 'withdraw_reset_time', 'label' => '重置时间', 'type' => 'input', 'default' => '00:00', 'help' => '按站点 WordPress 时区重置,格式 HH:MM。'],
|
['key' => 'withdraw_daily_limit', 'label' => '每日提现上限', 'type' => 'number', 'default' => 50, 'min' => 0, 'max' => 999999, 'dependsOn' => ['key' => 'pay_balance_withdraw_s', 'value' => true]],
|
||||||
|
['key' => 'withdraw_reset_time', 'label' => '重置时间', 'type' => 'input', 'default' => '00:00', 'help' => '按站点 WordPress 时区重置,格式 HH:MM。', 'dependsOn' => ['key' => 'pay_balance_withdraw_s', 'value' => true]],
|
||||||
]],
|
]],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in new issue
Block a user