xxxrrrdddd 2 years ago
parent
commit
ef4df46b2d
1 changed files with 10 additions and 0 deletions
  1. 10 0
      application/admin/controller/Ad.php

+ 10 - 0
application/admin/controller/Ad.php

@@ -71,4 +71,14 @@ class Ad extends Backend
         return \app\common\model\Ad::$pos;
     }
 
+    public function edit($ids = null)
+    {
+        if($this->admin('is_sub')){
+            $check=$this->model->where('id',$ids)->where('admin_id',$this->auth->id)->find();
+            if(!$check){
+                $this->error('无权操作');
+            }
+        }
+        return parent::edit($ids);
+    }
 }