Quellcode durchsuchen

提现门槛,充值测试

lizhen_gitee vor 2 Monaten
Ursprung
Commit
8516d1f571
2 geänderte Dateien mit 16 neuen und 2 gelöschten Zeilen
  1. 6 0
      application/api/controller/Notify.php
  2. 10 2
      application/api/controller/Takecash.php

+ 6 - 0
application/api/controller/Notify.php

@@ -247,6 +247,12 @@ class Notify extends Api
         exit;
     }
 
+    public function vip_notify_test(){
+        $out_trade_no = input('out_trade_no','');
+        $rs = $this->vip_notify_do($out_trade_no);
+        dump($rs);
+    }
+
     //充值金币 逻辑
     private function vip_notify_do($out_trade_no){
 

+ 10 - 2
application/api/controller/Takecash.php

@@ -69,9 +69,17 @@ class Takecash extends Api
             $this->error('请选择提现账户~');
         }
 
-        /*if ($this->auth->idcard_status != 1) {
+        if ($this->auth->idcard_status != 1) {
             $this->error('请先完成实名认证~');
-        }*/
+        }
+
+        if ($this->auth->gender == 1) {
+            $user_wallet = Db::name('user_wallet')->where('user_id',$this->auth->id)->find();
+            $is_vip = $this->is_vip($user_wallet['vip_endtime'],$user_wallet['vip_level']);
+            if($is_vip != 2){
+                $this->error('SVIP才能提现');
+            }
+        }
 
         if ($id > 0) {
             $withdrawal_config = Db::name('withdrawal_config')->find($id);