feat(users): normalize center routes and withdrawal limits

This commit is contained in:
2026-08-12 19:44:47 +08:00
parent 9004f7093f
commit dacd0095bf
24 changed files with 326 additions and 174 deletions
@@ -313,6 +313,7 @@ export const pageDisplaySchemas = {
user_home_tabs_mobile_hide: '',
user_home_sidebar: false,
user_home_cover: true,
user_home_route_identifier: 'nicename',
user_home_follow: true,
user_home_posts_per_page: 10,
user_home_avatar: true,
@@ -332,6 +333,7 @@ export const pageDisplaySchemas = {
icon: 'fas fa-th-large',
fields: [
{ key: 'user_home_cover', label: '封面区域', type: 'switch', default: true, help: '用户主页顶部封面图' },
{ key: 'user_home_route_identifier', label: '主页 URL 标识', type: 'select', default: 'nicename', options: [{ label: '用户名 URL slug', value: 'nicename' }, { label: '数字用户 ID', value: 'uid' }] },
{ key: 'user_home_sidebar', label: '侧边栏(已弃用)', type: 'switch', default: false, help: '公开主页为通栏布局(对齐 Zibll author);运行时强制关闭。交易服务请去用户中心。' },
{ key: 'user_home_follow', label: '关注按钮', type: 'switch', default: true },
{ key: 'user_home_posts_per_page', label: '每页文章数', type: 'number', default: 10, min: 5, max: 50 },
@@ -24,7 +24,6 @@ export const rechargeSchema = {
pay_balance_exchange_rate: 100,
pay_balance_exchange_desc: '',
pay_balance_withdraw_s: false,
pay_balance_withdraw_lowest_money: 50,
},
groups: [
{
@@ -94,7 +93,6 @@ export const rechargeSchema = {
icon: 'fas fa-hand-holding-usd',
fields: [
{ key: 'pay_balance_withdraw_s', label: '启用余额提现', type: 'switch', default: false, dependsOn: { key: 'pay_balance_s', value: true } },
{ key: 'pay_balance_withdraw_lowest_money', label: '最低提现金额', type: 'number', default: 50, min: 1, max: 99999, dependsOn: { key: 'pay_balance_withdraw_s', value: true } },
],
},
],
@@ -2,11 +2,13 @@ export const withdrawalSchema = {
key: 'payment.withdrawal',
title: '提现管理',
icon: 'fas fa-hand-holding-usd',
description: '配置提现门槛、手续费比例和提现说明。',
description: '配置提现门槛、手续费比例与每日限制。',
defaults: {
pay_rebate_withdraw_lowest_money: 50,
withdraw_service_charge: 0,
pay_rebate_withdraw_text_details: '<div>可提现金额达到50元后即可发起提现</div>\n<div>申请提现需后台人工处理,一般2-3小时,请耐心等待</div>\n<div>如有其它疑问,请与客服联系</div>',
withdraw_service_charge: 5,
withdraw_daily_count: 3,
withdraw_daily_limit: 50,
withdraw_reset_time: '00:00',
},
groups: [
{
@@ -14,9 +16,11 @@ export const withdrawalSchema = {
title: '提现设置',
icon: 'fas fa-sliders-h',
fields: [
{ key: 'pay_rebate_withdraw_lowest_money', label: '最低提现金额', type: 'number', default: 50, min: 1, max: 99999 },
{ key: 'withdraw_service_charge', label: '提现手续费(%)', type: 'number', default: 0, min: 0, max: 50 },
{ key: 'pay_rebate_withdraw_text_details', label: '提现说明', type: 'textarea', default: '<div>可提现金额达到50元后即可发起提现</div>\n<div>申请提现需后台人工处理,一般2-3小时,请耐心等待</div>\n<div>如有其它疑问,请与客服联系</div>' },
{ 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。' },
],
},
],