From 5a66757dbc3491868a36bdf70230b3a41b31a966 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Sat, 6 May 2023 14:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E7=9A=84=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E9=97=AD=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=92=8C?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adminapi/controller/v1/setting/SystemMenus.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php index 1ee024406..166607f07 100644 --- a/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php +++ b/crmeb/app/adminapi/controller/v1/setting/SystemMenus.php @@ -267,7 +267,7 @@ class SystemMenus extends AuthController } /** - * 显示和隐藏 + * 权限的开启和关闭,显示和隐藏 * @param $id * @return mixed */ @@ -277,9 +277,14 @@ class SystemMenus extends AuthController return app('json')->fail(100100); } - [$show] = $this->request->postMore([['is_show', 0]], true); + [$isShow, $isShowPath] = $this->request->postMore([['is_show', 0], ['is_show_path', 0]], true); + if ($isShow == -1) { + $res = $this->services->update($id, ['is_show_path' => $isShowPath]); + } else { + $res = $this->services->update($id, ['is_show' => $isShow, 'is_show_path' => $isShow]); + } - if ($this->services->update($id, ['is_show' => $show])) { + if ($res) { return app('json')->success(100001); } else { return app('json')->fail(100007);