Преглед изворни кода

Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

From-wh пре 2 година
родитељ
комит
35e78ad056
1 измењених фајлова са 8 додато и 3 уклоњено
  1. 8 3
      crmeb/app/adminapi/controller/v1/setting/SystemMenus.php

+ 8 - 3
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);