From 4c364fddd0ee41611f28051b04b081a55420a49a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 6 May 2023 15:17:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=88=97=E8=A1=A8=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/v1/setting/SystemMenus.php | 7 +++++++ crmeb/app/model/system/SystemMenus.php | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) 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); + } } }