作者 郭盛
1 个管道 的构建 通过 耗费 10 秒

修改搜索接口

@@ -232,25 +232,34 @@ class Index extends Api @@ -232,25 +232,34 @@ class Index extends Api
232 } 232 }
233 } 233 }
234 234
  235 + $where['user_id'] = $user_id;
  236 + $where['folder_id'] = 0;
  237 +
  238 + $tiao['a.folder_id'] = 0;
  239 + $tiao['a.user_id'] = $user_id;
  240 +
235 //判断分类 1笔记2图片3视频 241 //判断分类 1笔记2图片3视频
236 $fenlei = $this->request->param('fenlei'); 242 $fenlei = $this->request->param('fenlei');
237 if($fenlei == 1){ 243 if($fenlei == 1){
238 - $where['type'] = 1;  
239 - $tiao['b.type'] = 1; 244 + $note = $this->myfile(1,$where,$user_id);
  245 + $rotor = $this->zhuan(1,$tiao);
  246 + $arr = $this->gong(1,$note,$rotor);
  247 + $Info['note'] = $this->sundry($arr);
  248 + $this->success('success',$Info);
240 }elseif ($fenlei == 2){ 249 }elseif ($fenlei == 2){
241 - $where['type'] = 2;  
242 - $tiao['b.type'] = 2; 250 + $pic = $this->myfile(2,$where,$user_id);
  251 + $rotor_pic = $this->zhuan(2,$tiao);
  252 + $arr_pic = $this->gong(2,$pic,$rotor_pic);
  253 + $Info['pic'] = $this->sundry($arr_pic);
  254 + $this->success('success',$Info);
243 }elseif ($fenlei == 3){ 255 }elseif ($fenlei == 3){
244 - $where['type'] = 3;  
245 - $tiao['b.type'] = 3; 256 + $video = $this->myfile(3,$where,$user_id);
  257 + $rotor_video = $this->zhuan(3,$tiao);
  258 + $arr_video = $this->gong(3,$video,$rotor_video);
  259 + $Info['video'] = $this->sundry($arr_video);
  260 + $this->success('success',$Info);
246 } 261 }
247 262
248 - $where['user_id'] = $user_id;  
249 - $where['folder_id'] = 0;  
250 -  
251 - $tiao['a.folder_id'] = 0;  
252 - $tiao['a.user_id'] = $user_id;  
253 -  
254 //自己的笔记文件 263 //自己的笔记文件
255 $note = $this->myfile(1,$where,$user_id); 264 $note = $this->myfile(1,$where,$user_id);
256 //自己的图片文件 265 //自己的图片文件