|
@@ -148,9 +148,11 @@ class Userwallet extends Api
|
|
|
|
|
|
//提现配置
|
|
|
public function take_cash_config(){
|
|
|
+ $idcard_confirm = Db::name('user_idconfirm')->where('user_id',$this->auth->id)->find();
|
|
|
+
|
|
|
$data = [
|
|
|
'money' => model('wallet')->getwallet($this->auth->id,'money'),
|
|
|
- 'alipay_account' => $this->auth->alipay_account,
|
|
|
+ 'alipay_account' => ($this->auth->idcard_status == 1 && isset($idcard_confirm['alipay_account'])) ? $idcard_confirm['alipay_account'] : '',
|
|
|
'min' => 1,
|
|
|
'max' => 1000,
|
|
|
];
|
|
@@ -166,8 +168,8 @@ class Userwallet extends Api
|
|
|
$this->error();
|
|
|
}
|
|
|
|
|
|
- if(empty($this->auth->alipay_account)){
|
|
|
- $this->error('请先完善支付宝账号信息');
|
|
|
+ if(empty($this->auth->idcard_status)){
|
|
|
+ $this->error('请先完成实名认证');
|
|
|
}
|
|
|
|
|
|
$check = Db::name('take_cash')->where(['user_id'=>$this->auth->id,'status'=>0])->find();
|
|
@@ -180,10 +182,11 @@ class Userwallet extends Api
|
|
|
$this->error('提现金额不能大于可提现余额');
|
|
|
}
|
|
|
|
|
|
+ $idcard_confirm = Db::name('user_idconfirm')->where('user_id',$this->auth->id)->find();
|
|
|
$data = [
|
|
|
'user_id' => $this->auth->id,
|
|
|
'number' => $money,
|
|
|
- 'alipay_account' => $this->auth->alipay_account,
|
|
|
+ 'alipay_account' => $idcard_confirm['alipay_account'],
|
|
|
'status' => 0,
|
|
|
'createtime' => time(),
|
|
|
'updatetime' => time(),
|