Browse Source

员工操作

lizhen_gitee 1 year ago
parent
commit
943f770c82
1 changed files with 10 additions and 0 deletions
  1. 10 0
      application/api/controller/company/Staff.php

+ 10 - 0
application/api/controller/company/Staff.php

@@ -24,6 +24,11 @@ class Staff extends Apic
 
     //新增
     public function add(){
+        //验证
+        if($this->auth->type != 1){
+            $this->error('只有门店老板才能设置');
+        }
+
         $data = [
             'truename'   => input('truename',''),
             'mobile'     => input('mobile',''),
@@ -69,6 +74,11 @@ class Staff extends Apic
 
     //编辑
     public function edit(){
+        //验证
+        if($this->auth->type != 1){
+            $this->error('只有门店老板才能设置');
+        }
+
         $id = input('id',0);
         $data = [
             'truename' => input('truename',''),