_vali([ 'code.value' => CodeExtend::uniqidDate(20, 'T'), 'type.require' => '提现方式不能为空!', 'amount.require' => '提现金额不能为空!', ]); $chargeRate = floatval(UserTransferService::instance()->config('transfer_charge')); $chargeAmount = $chargeRate * $data['amount']; } public function get() { } /** * 获取用户提现配置 * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function config() { $data = UserTransferService::instance()->config(); $this->success('获取用户提现配置', $data); } }