正在显示
1 个修改的文件
包含
1 行增加
和
4 行删除
| @@ -32,6 +32,7 @@ class CategoryController extends BaseController | @@ -32,6 +32,7 @@ class CategoryController extends BaseController | ||
| 32 | $this->map = $this->searchParam(); | 32 | $this->map = $this->searchParam(); |
| 33 | $filed = ['id', 'project_id', 'pid', 'title', 'image', 'route', 'status','created_at','sort']; | 33 | $filed = ['id', 'project_id', 'pid', 'title', 'image', 'route', 'status','created_at','sort']; |
| 34 | $this->map['deleted_at'] = null; | 34 | $this->map['deleted_at'] = null; |
| 35 | + $this->map['pid'] = $this->map['pid'] ?? 0; | ||
| 35 | $list = $category->list($this->map,['sort','id'],$filed); | 36 | $list = $category->list($this->map,['sort','id'],$filed); |
| 36 | $data = []; | 37 | $data = []; |
| 37 | if(!empty($list)){ | 38 | if(!empty($list)){ |
| @@ -43,12 +44,8 @@ class CategoryController extends BaseController | @@ -43,12 +44,8 @@ class CategoryController extends BaseController | ||
| 43 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_LIST,$template_id,$v['id']); | 44 | $v['is_renovation'] = $this->getIsRenovation(BTemplate::SOURCE_PRODUCT,BTemplate::IS_LIST,$template_id,$v['id']); |
| 44 | $list[$k] = $v; | 45 | $list[$k] = $v; |
| 45 | } | 46 | } |
| 46 | - if(!isset($this->map['title'])){ | ||
| 47 | - $data = $this->getListSon($list); | ||
| 48 | - }else{ | ||
| 49 | $data = $list; | 47 | $data = $list; |
| 50 | } | 48 | } |
| 51 | - } | ||
| 52 | return $this->response('success',Code::SUCCESS,$data); | 49 | return $this->response('success',Code::SUCCESS,$data); |
| 53 | } | 50 | } |
| 54 | 51 |
-
请 注册 或 登录 后发表评论