feat(users): normalize center routes and withdrawal limits
This commit is contained in:
@@ -207,6 +207,24 @@ class SchemaProvider {
|
||||
}
|
||||
}
|
||||
|
||||
if ($domain === 'payment' && $section === 'withdrawal') {
|
||||
$stored = get_option('aksrt_settings', []);
|
||||
$merged = is_array($stored) ? array_merge($stored, $data) : $data;
|
||||
$count = $merged['withdraw_daily_count'] ?? 3;
|
||||
$min = (float) ($merged['pay_rebate_withdraw_lowest_money'] ?? 50);
|
||||
$limit = (float) ($merged['withdraw_daily_limit'] ?? 50);
|
||||
$time = (string) ($merged['withdraw_reset_time'] ?? '00:00');
|
||||
if (filter_var($count, FILTER_VALIDATE_INT) === false || (int) $count < 0) {
|
||||
$errors[] = __('每日可提现次数必须是非负整数', 'aksrt');
|
||||
}
|
||||
if ($limit < $min) {
|
||||
$errors[] = __('每日提现上限不得低于最低提现金额', 'aksrt');
|
||||
}
|
||||
if (preg_match('/^(?:[01]\\d|2[0-3]):[0-5]\\d$/', $time) !== 1) {
|
||||
$errors[] = __('重置时间必须为 HH:MM', 'aksrt');
|
||||
}
|
||||
}
|
||||
|
||||
return ['valid' => empty($errors), 'errors' => $errors];
|
||||
}
|
||||
|
||||
@@ -318,6 +336,10 @@ class SchemaProvider {
|
||||
$stored[$key] = $value;
|
||||
}
|
||||
|
||||
if (($schema['key'] ?? '') === 'withdrawal') {
|
||||
unset($stored['pay_rebate_withdraw_text_details'], $stored['pay_balance_withdraw_lowest_money']);
|
||||
}
|
||||
|
||||
// Captcha: keep enabled_scenarios / disabled_scenarios mirrors in sync.
|
||||
if ($option_key === 'aksrt_captcha_config' && function_exists('aksrt_captcha_scenes')) {
|
||||
$all = array_keys(aksrt_captcha_scenes());
|
||||
|
||||
Reference in New Issue
Block a user