作者 lyh

gx

@@ -42,8 +42,10 @@ class CategoryController extends BaseController @@ -42,8 +42,10 @@ class CategoryController extends BaseController
42 $v['image_link'] = getImageUrl($v['image']); 42 $v['image_link'] = getImageUrl($v['image']);
43 $list[$k] = $v; 43 $list[$k] = $v;
44 } 44 }
  45 + if(!isset($this->map['title'])){
45 $data = $this->getListSon($list); 46 $data = $this->getListSon($list);
46 } 47 }
  48 + }
47 return $this->response('success',Code::SUCCESS,$data); 49 return $this->response('success',Code::SUCCESS,$data);
48 } 50 }
49 51
@@ -58,10 +60,6 @@ class CategoryController extends BaseController @@ -58,10 +60,6 @@ class CategoryController extends BaseController
58 if(!empty($this->map['title'])){ 60 if(!empty($this->map['title'])){
59 $this->map['title'] = ['like','%'.$this->map['title'].'%']; 61 $this->map['title'] = ['like','%'.$this->map['title'].'%'];
60 } 62 }
61 - if(!empty($this->map['search'])){  
62 - $this->map['title'] = ['like','%'.$this->map['search'].'%'];  
63 - }  
64 - unset($this->map['search']);  
65 $this->map['project_id'] = $this->user['project_id']; 63 $this->map['project_id'] = $this->user['project_id'];
66 return $this->map; 64 return $this->map;
67 } 65 }