fix(credits): align asset actions and withdrawal settings

Use matching outlined controls on the points card and manage the
balance-withdrawal switch exclusively from the withdrawal settings page.
This commit is contained in:
2026-08-13 15:35:01 +08:00
parent 1247f9bf4e
commit 179d577d28
4 changed files with 14 additions and 23 deletions
@@ -25,7 +25,6 @@ export const rechargeSchema = {
pay_balance_points_exchange_min_points: 100,
pay_balance_points_exchange_daily_max_points: 100000,
pay_balance_points_exchange_desc: '',
pay_balance_withdraw_s: false,
},
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: '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',
description: '配置提现门槛、手续费比例与每日限制。',
defaults: {
pay_balance_withdraw_s: false,
pay_rebate_withdraw_lowest_money: 50,
withdraw_service_charge: 5,
withdraw_daily_count: 3,
@@ -16,11 +17,12 @@ export const withdrawalSchema = {
title: '提现设置',
icon: 'fas fa-sliders-h',
fields: [
{ key: 'pay_rebate_withdraw_lowest_money', label: '最低提现金额', type: 'number', default: 50, min: 0, max: 99999 },
{ key: 'withdraw_service_charge', label: '提现手续费(%)', type: 'number', default: 5, min: 0, max: 50 },
{ key: 'withdraw_daily_count', label: '每日可提现次数', type: 'number', default: 3, min: 0, max: 99999 },
{ key: 'withdraw_daily_limit', label: '每日提现上限', type: 'number', default: 50, min: 0, max: 999999 },
{ key: 'withdraw_reset_time', label: '重置时间', type: 'input', default: '00:00', help: '按站点 WordPress 时区重置,格式 HH:MM。' },
{ key: 'pay_balance_withdraw_s', label: '启用余额提现', type: 'switch', default: false },
{ 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_service_charge', label: '提现手续费(%)', type: 'number', default: 5, min: 0, max: 50, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
{ key: 'withdraw_daily_count', label: '每日可提现次数', type: 'number', default: 3, min: 0, max: 99999, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
{ 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 } },
],
},
],