|
@@ -19,8 +19,10 @@ class Money extends Api
|
|
|
$data = [
|
|
|
'score' => model('wallet')->getWallet($this->auth->id,'score'),
|
|
|
'score_bufen' => model('wallet')->getWallet($this->auth->id,'shouyi'),
|
|
|
- 'min_withdrawal_money' => 1,
|
|
|
- 'max_withdrawal_money' => 50000,
|
|
|
+ 'bufen_bei' => config('site.withdraw_bufen_bei'), //部分提现整数倍
|
|
|
+ 'bufen_bei_remark' => '部分提现只能提'.config('site.withdraw_bufen_bei').'的整数倍',
|
|
|
+// 'min_withdrawal_money' => 1,
|
|
|
+// 'max_withdrawal_money' => 50000,
|
|
|
'type_1' => Db::name('user_withdraw')->where('user_id',$this->auth->id)->where('type',1)->where('status',1)->field('realname,banknumber,bankname')->find(),
|
|
|
'type_2' => Db::name('user_withdraw')->where('user_id',$this->auth->id)->where('type',2)->where('status',1)->field('realname,banknumber,bankname')->find(),
|
|
|
'type_3' => Db::name('user_withdraw')->where('user_id',$this->auth->id)->where('type',3)->where('status',1)->field('realname,banknumber,bankname')->find(),
|
|
@@ -69,7 +71,22 @@ class Money extends Api
|
|
|
if($from == 'all'){
|
|
|
$user_money = model('wallet')->getWallet($this->auth->id,'score');
|
|
|
}else{
|
|
|
- $user_money = model('wallet')->getWallet($this->auth->id,'shouyi');
|
|
|
+ //部分提现
|
|
|
+ $user_money = model('wallet')->getWallet($this->auth->id,'shouyi'); //最大
|
|
|
+
|
|
|
+ $bufen_score = input('bufen_score',0,'intval'); //传入值
|
|
|
+ if($bufen_score > $user_money){
|
|
|
+ $this->error('部分提现最高:'.$user_money);
|
|
|
+ }
|
|
|
+ $bufen_bei = config('site.withdraw_bufen_bei'); //部分提现整数倍
|
|
|
+ if($bufen_score < $bufen_bei){
|
|
|
+ $this->error('部分提现只能是'.$bufen_bei.'的整数倍,最小一倍,即:'.$bufen_bei);
|
|
|
+ }
|
|
|
+ if($bufen_score % $bufen_bei > 0){
|
|
|
+ $this->error('部分提现只能是'.$bufen_bei.'的整数倍');
|
|
|
+ }
|
|
|
+
|
|
|
+ $user_money = $bufen_score;//传入值赋值
|
|
|
}
|
|
|
|
|
|
if ($user_money <= 0) {
|