Browse Source

Merge branch 'bug_fix_1212_liu'

rkljw 3 months ago
parent
commit
6812a8a263
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/JsonRpc/AuthorityService.php

+ 5 - 1
app/JsonRpc/AuthorityService.php

@@ -18,7 +18,11 @@ class AuthorityService implements AuthorityServiceInterface
      */
     public function getMenuList(array $data): array
     {
-        $result = Menu::get();
+        $where = [];
+        if(isset($data['id']) && $data['id']){
+            array_push($where,['pid','=',$data['id']]);
+        }
+        $result = Menu::where($where)->get();
         if (empty($result)) {
             return Result::error("没有菜单",0,[]);
         }