Browse Source

提现限制身份

lizhen_gitee 1 year ago
parent
commit
5abf913bda
1 changed files with 4 additions and 1 deletions
  1. 4 1
      application/api/controller/company/Takecash.php

+ 4 - 1
application/api/controller/company/Takecash.php

@@ -31,6 +31,9 @@ class Takecash extends Apic
 
     //提现
     public function take_cash(){
+        if($this->auth->type != 1){
+            $this->error('只有门店老板才能操作');
+        }
 
         $money = floatval(input('money', 0, 'trim'));
 
@@ -52,7 +55,7 @@ class Takecash extends Apic
         //查重
         $check = Db::name('company_take_cash')->where(['user_id'=>$this->auth->company_id,'status'=>0])->find();
         if($check){
-            $this->error('您已经申请了提现,请等待审核');
+            $this->success('您已经申请了提现,请等待审核');
         }
 
         //对比