|
@@ -14,13 +14,21 @@ class Takecash extends Api
|
|
|
|
|
|
//提现配置
|
|
|
public function take_cash_config(){
|
|
|
- $idcard_confirm = Db::name('user_idconfirm')->where('user_id',$this->auth->id)->find();
|
|
|
+ $config = Db::name('take_cash_config')->order('weigh asc,id asc')->select();
|
|
|
+
|
|
|
+ $plat_bilv = config('site.withdrawal_plat_bili');
|
|
|
+ foreach($config as $key => &$val){
|
|
|
+ $val['get_money'] = bcdiv(bcmul($val['money'],(100-$plat_bilv),2),100,2);
|
|
|
+ }
|
|
|
|
|
|
$data = [
|
|
|
- 'money' => model('wallet')->getwallet($this->auth->id,'money'),
|
|
|
- 'alipay_account' => ($this->auth->idcard_status == 1 && isset($idcard_confirm['alipay_account'])) ? $idcard_confirm['alipay_account'] : '',
|
|
|
- 'min' => 1,
|
|
|
- 'max' => 1000,
|
|
|
+ 'config' => $config,
|
|
|
+ 'wallet' => model('wallet')->getwallet($this->auth->id),
|
|
|
+ 'min' => config('site.min_withdrawal_money'),
|
|
|
+ 'max' => config('site.max_withdrawal_money'),
|
|
|
+ 'plat_bilv' => $plat_bilv,
|
|
|
+ 'user_bank' => Db::name('user_bank')->where('user_id',$this->auth->id)->find(),
|
|
|
+ 'user_alipay' => Db::name('user_alipay')->where('user_id',$this->auth->id)->find(),
|
|
|
];
|
|
|
|
|
|
$this->success('success',$data);
|
|
@@ -66,7 +74,10 @@ class Takecash extends Api
|
|
|
|
|
|
//提现记录
|
|
|
public function take_cash_log(){
|
|
|
- $list = Db::name('take_cash')->where(['user_id'=>$this->auth->id])->autopage()->select();
|
|
|
+ $list = Db::name('take_cash')->field('id,money,type,createtime')->where(['user_id'=>$this->auth->id])->autopage()->select();
|
|
|
+ foreach($list as $key => &$val){
|
|
|
+ $val['remark'] = $val['type'] == 1 ? '支付宝提现' : '银行卡提现';
|
|
|
+ }
|
|
|
|
|
|
$this->success('success',$list);
|
|
|
}
|