|
|
@@ -57,6 +57,7 @@ class UserExtractController
|
|
|
$data['minPrice'] = sys_config('user_extract_min_price');//提现最低金额
|
|
|
$data['extractInfo'] = UserExtract::userLastInfo($user['uid']);
|
|
|
$data['extract_commission'] = sys_config('extract_commission', 0);
|
|
|
+
|
|
|
return app('json')->successful($data);
|
|
|
}
|
|
|
|
|
|
@@ -99,6 +100,11 @@ class UserExtractController
|
|
|
if ($data['broken_commission'] < 0)
|
|
|
$data['broken_commission'] = 0;
|
|
|
$data['brokerage_price'] = $user['brokerage_price'];
|
|
|
+ $retention_money = sys_config('retention_money', 0); //健康币最低保留金额
|
|
|
+ $brokerage_price = bcsub($user['brokerage_price'], $data['money'], 2);
|
|
|
+ if ($brokerage_price < $retention_money){
|
|
|
+ return app('json')->fail('提现后健康币不能低于'. $retention_money);
|
|
|
+ }
|
|
|
//可提现佣金
|
|
|
$commissionCount = $data['brokerage_price'] - $data['broken_commission'];
|
|
|
if ($extractInfo['money'] > $commissionCount) return app('json')->fail('可提现佣金不足');
|