feat(withdraw): 后台支持提现总开关与方式过滤并升级钱包与提现页面体验

这个提交包含在:
chen
2026-09-19 15:41:25 +08:00
父节点 efab61498d
当前提交 3868becc63
共有 17 个文件被更改,包括 1872 次插入 和 116 次删除

查看文件

@@ -47,6 +47,9 @@ class Config extends Common
}
$config[self::getShortCode($row)] = $row->value;
}
if ($code === 'shop.recharge_withdraw.withdraw' && !isset($config['status'])) {
$config['status'] = !empty($config['methods']) ? 1 : 0;
}
}
// 设置配置缓存
cache("config:{$code}", $config);
@@ -124,6 +127,19 @@ class Config extends Common
$config->value = $value;
$config->save();
}
} else {
// 自动补齐缺失的提现开关配置项,确保热更新无缝落地
if ($code === 'shop.recharge_withdraw.withdraw.status') {
self::create([
'code' => $code,
'parent_code' => 'shop.recharge_withdraw.withdraw',
'name' => '开启提现',
'type' => 'boolean',
'value' => (string)intval($value),
'rule' => 'required',
'weigh' => 50
]);
}
}
}