|
@@ -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,[]);
|
|
|
}
|