|
...
|
...
|
@@ -32,6 +32,7 @@ class CategoryController extends BaseController |
|
|
|
$this->map = $this->searchParam();
|
|
|
|
$filed = ['id', 'project_id', 'pid', 'title', 'image', 'route', 'status','created_at','sort'];
|
|
|
|
$this->map['deleted_at'] = null;
|
|
|
|
$this->map['pid'] = $this->map['pid'] ?? 0;
|
|
|
|
$list = $category->list($this->map,['sort','id'],$filed);
|
|
|
|
$data = [];
|
|
|
|
if(!empty($list)){
|
|
...
|
...
|
@@ -43,11 +44,7 @@ class CategoryController extends BaseController |
|
|
|
$v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_LIST,$template_id,$v['id']);
|
|
|
|
$list[$k] = $v;
|
|
|
|
}
|
|
|
|
if(!isset($this->map['title'])){
|
|
|
|
$data = $this->getListSon($list);
|
|
|
|
}else{
|
|
|
|
$data = $list;
|
|
|
|
}
|
|
|
|
$data = $list;
|
|
|
|
}
|
|
|
|
return $this->response('success',Code::SUCCESS,$data);
|
|
|
|
}
|
...
|
...
|
|