wesmiler 1 周之前
父節點
當前提交
dd5e5818d1
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Services/Common/MenuService.php

+ 3 - 2
app/Services/Common/MenuService.php

@@ -118,6 +118,9 @@ class MenuService extends BaseService
         // 权限节点
         $checkedList = isset($param['checkedList']) ? $param['checkedList'] : array();
         unset($param['checkedList']);
+
+        $param['path'] = isset($param['path'])?$param['path']:'';
+        $param['component'] = isset($param['component'])?$param['component']:'';
         // 保存数据
         $result = $this->model->edit($param);
         if (!$result) {
@@ -139,8 +142,6 @@ class MenuService extends BaseService
                 $data['status'] = 1;
                 $data['sort'] = intval($val);
                 $data['target'] = $param['target'];
-                $data['path'] = isset($param['path'])?$param['path']:'';
-                $data['component'] = isset($param['component'])?$param['component']:'';
 
                 // 判断当前节点是否已存在
                 $permissionInfo = $this->model