作者 lyh

gx

@@ -37,6 +37,7 @@ class CategoryController extends BaseController @@ -37,6 +37,7 @@ class CategoryController extends BaseController
37 $this->map['project_id'] = $this->user['project_id']; 37 $this->map['project_id'] = $this->user['project_id'];
38 $filed = ['id', 'project_id', 'pid', 'title', 'image', 'route','keywords', 'describe', 'status','created_at']; 38 $filed = ['id', 'project_id', 'pid', 'title', 'image', 'route','keywords', 'describe', 'status','created_at'];
39 $list = $category->list($this->map,'id',$filed); 39 $list = $category->list($this->map,'id',$filed);
  40 + $data = [];
40 if(!empty($list)){ 41 if(!empty($list)){
41 foreach ($list as $k =>$v){ 42 foreach ($list as $k =>$v){
42 $v = $this->handleParam($category,$v); 43 $v = $this->handleParam($category,$v);
@@ -29,14 +29,6 @@ class Category extends Base @@ -29,14 +29,6 @@ class Category extends Base
29 */ 29 */
30 protected $child_ids_arr = []; 30 protected $child_ids_arr = [];
31 31
32 -  
33 -// protected $appends = ['route'];  
34 -  
35 -// public function getRouteAttribute(){  
36 -// return RouteMap::getRoute(RouteMap::SOURCE_PRODUCT_CATE, $this->id, $this->project_id);  
37 -// }  
38 -  
39 -  
40 /** 32 /**
41 * 获取指定分类的所有子分类IDS(包括自己) 33 * 获取指定分类的所有子分类IDS(包括自己)
42 * @param $id 34 * @param $id