diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php index 166607f07..de9dc1dad 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php @@ -40,12 +40,19 @@ class SystemMenus extends AuthController /** * 菜单展示列表 * @return \think\Response + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author 吴汐 + * @email 442384644@qq.com + * @date 2023/05/06 */ public function index() { $where = $this->request->getMore([ ['is_show', ''], ['keyword', ''], + ['auth_type', ''], ]); return app('json')->success($this->services->getList($where)); } diff --git a/crmeb/app/model/system/SystemMenus.php b/crmeb/app/model/system/SystemMenus.php index d6b50175d..0a73b5d00 100644 --- a/crmeb/app/model/system/SystemMenus.php +++ b/crmeb/app/model/system/SystemMenus.php @@ -231,6 +231,8 @@ class SystemMenus extends BaseModel */ public function searchAuthTypeAttr($query, $value) { - $query->where('auth_type', $value); + if ($value !== '') { + $query->where('auth_type', $value); + } } }