|
@@ -154,6 +154,8 @@ class Userwallet extends Api
|
|
|
|
|
|
$return_data['show'] = $show;
|
|
|
$return_data['withdrawal_rate'] = config('site.withdrawal_rate') > 0 ? config('site.withdrawal_rate') : 10;
|
|
|
+ $return_data['exchange_rate'] = 100; //固定100
|
|
|
+ $return_data['min'] = config('site.withdraw_min_money');
|
|
|
$return_data['list'] = $list;
|
|
|
|
|
|
$this->success('success',$return_data);
|
|
@@ -199,13 +201,19 @@ class Userwallet extends Api
|
|
|
}
|
|
|
if ($freemoney > 0) {
|
|
|
//扣除金额
|
|
|
- $money = $freemoney;
|
|
|
+ $money = floatval($freemoney);
|
|
|
+
|
|
|
+ $withdraw_min_money = config('site.withdraw_min_money');
|
|
|
+ if($money < $withdraw_min_money){
|
|
|
+ $this->error('最低提现'.$withdraw_min_money.'积分');
|
|
|
+ }
|
|
|
+
|
|
|
//平台手续费
|
|
|
- $bili = config('site.withdrawal_rate') >= 0 ? config('site.withdrawal_rate') : 10;
|
|
|
- $plat_money = bcdiv(bcmul($money,$bili,2),100,2);
|
|
|
+ $withdrawal_rate = config('site.withdrawal_rate') >= 0 ? config('site.withdrawal_rate') : 10;
|
|
|
+ $plat_money = bcdiv(bcmul($money,$withdrawal_rate,2),100,2);
|
|
|
|
|
|
//减去手续费,得实得金额
|
|
|
- $real_money = bcsub($money,$plat_money,2);
|
|
|
+ $real_money = bcdiv(bcsub($money,$plat_money,2),100,2);
|
|
|
}
|
|
|
|
|
|
if ($money <= 0 || $real_money <= 0) {
|