mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: commission withdraw limit
This commit is contained in:
parent
06d22e7585
commit
c02db9d957
@ -46,7 +46,8 @@ class ConfigController extends Controller
|
||||
'invite_gen_limit' => config('v2board.invite_gen_limit', 5),
|
||||
'invite_never_expire' => config('v2board.invite_never_expire', 0),
|
||||
'commission_first_time_enable' => config('v2board.commission_first_time_enable', 1),
|
||||
'commission_auto_check_enable' => config('v2board.commission_auto_check_enable', 1)
|
||||
'commission_auto_check_enable' => config('v2board.commission_auto_check_enable', 1),
|
||||
'commission_withdraw_limit' => config('v2board.commission_withdraw_limit', 100)
|
||||
],
|
||||
'site' => [
|
||||
'safe_mode_enable' => (int)config('v2board.safe_mode_enable', 0),
|
||||
|
@ -152,6 +152,11 @@ class TicketController extends Controller
|
||||
|
||||
public function withdraw(TicketWithdraw $request)
|
||||
{
|
||||
$user = User::find($request->session()->get('id'));
|
||||
$limit = config('v2board.commission_withdraw_limit', 100);
|
||||
if ($limit < ($user->commission_balance / 100)) {
|
||||
abort(500, '当前系统要求的提现门槛为:' . $limit);
|
||||
}
|
||||
DB::beginTransaction();
|
||||
$subject = '[提现申请]本工单由系统发出';
|
||||
$ticket = Ticket::create([
|
||||
|
@ -22,6 +22,7 @@ class ConfigSave extends FormRequest
|
||||
'invite_never_expire' => 'in:0,1',
|
||||
'commission_first_time_enable' => 'in:0,1',
|
||||
'commission_auto_check_enable' => 'in:0,1',
|
||||
'commission_withdraw_limit' => 'nullable|numeric',
|
||||
// site
|
||||
'stop_register' => 'in:0,1',
|
||||
'email_verify' => 'in:0,1',
|
||||
|
2
public/assets/admin/umi.js
vendored
2
public/assets/admin/umi.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user