diff --git a/app/controller/admin/store/StoreCategory.php b/app/controller/admin/store/StoreCategory.php index d2b40eab..b5151810 100644 --- a/app/controller/admin/store/StoreCategory.php +++ b/app/controller/admin/store/StoreCategory.php @@ -205,25 +205,25 @@ class StoreCategory extends BaseController $lv = $this->request->param('lv', null); if (!is_null($lv)) $lv = $lv + 1; $data = $this->repository->getList($type, $lv); - if ($lv) { - $ret = $data; - } else { - $ret = []; - foreach ($data as $key => $value) { - if (isset($value['children'])) { - $level = []; - foreach ($value['children'] as $child) { - if (isset($child['children'])) { - $level[] = $child; - } - } - if (isset($level) && !empty($level)) { - $value['children'] = $level; - $ret[] = $value; - } - } - } - } +// if ($lv) { +// $ret = $data; +// } else { +// $ret = []; +// foreach ($data as $key => $value) { +// if (isset($value['children'])) { +// $level = []; +// foreach ($value['children'] as $child) { +// if (isset($child['children'])) { +// $level[] = $child; +// } +// } +// if (isset($level) && !empty($level)) { +// $value['children'] = $level; +// $ret[] = $value; +// } +// } +// } +// } return app('json')->success($ret); }