作者 Cool
1 个管道 的构建 通过 耗费 0 秒

搜索接口修改

@@ -109,6 +109,7 @@ class Index extends Api @@ -109,6 +109,7 @@ class Index extends Api
109 $user_id = $this->auth->id; 109 $user_id = $this->auth->id;
110 $is_up = $this->request->param('is_up'); 110 $is_up = $this->request->param('is_up');
111 111
  112 + $where = [];
112 $keyword = $this->request->param('keyword'); 113 $keyword = $this->request->param('keyword');
113 if(!empty($keyword)){ 114 if(!empty($keyword)){
114 $where['folder_name'] = ['like',"%$keyword%"]; 115 $where['folder_name'] = ['like',"%$keyword%"];
@@ -117,8 +118,6 @@ class Index extends Api @@ -117,8 +118,6 @@ class Index extends Api
117 //判断是否为全部还是 已上架/已下架 118 //判断是否为全部还是 已上架/已下架
118 if(!empty($is_up)){ 119 if(!empty($is_up)){
119 $where['is_up'] = ['eq',$is_up]; 120 $where['is_up'] = ['eq',$is_up];
120 - }else{  
121 - $where = true;  
122 } 121 }
123 122
124 123