shish 4 년 전
부모
커밋
d0753bc49b
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      app-ghs/controllers/BaseController.php

+ 4 - 2
app-ghs/controllers/BaseController.php

@@ -44,8 +44,10 @@ class BaseController extends PublicController
         }
         $this->admin = $admin;
         // 只能供应商访问
-        if ($admin->style != AdminClass::STYLE_GHS) {
-            util::fail('您没有权限访问哦');
+        if (in_array($action->id, $this->guestAccess) == false) {
+            if ($admin->style != AdminClass::STYLE_GHS) {
+                util::fail('您没有权限访问哦');
+            }
         }
         //后台
         $currentShopId = $admin->currentShopId ?? 0;