瀏覽代碼

花材管理

shish 5 年之前
父節點
當前提交
8bdc7200ba
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. 18 0
      app-pt/controllers/BaseController.php

+ 18 - 0
app-pt/controllers/BaseController.php

@@ -23,6 +23,24 @@ class BaseController extends PublicController
         if (empty($staffId)) {
             $this->validate = false;
         }
+
+        //纯彩花艺临时开放花材管理权限
+        if ($staffId == 4) {
+            $currentRoute = $this->id . '/' . $action->id;
+            $arr = [
+                'staff/login-detail',
+                'item/list',
+                'item-class/list',
+                'item-class/get-all-class',
+                'unit/get-all-unit',
+                'upload/save-img',
+                'item/add',
+            ];
+            if (in_array($currentRoute, $arr) == false) {
+                util::fail('没有找到资源');
+            }
+        }
+
         //游客可以访问的方法
         if (in_array($action->id, $this->guestAccess)) {
             $this->validate = true;