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

修改过期时间

@@ -80,7 +80,7 @@ class Index extends Api @@ -80,7 +80,7 @@ class Index extends Api
80 * 80 *
81 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") 81 * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
82 * @ApiParams (name="is_up", type="inter", required=false, description="是否上架 为空是全部1已上架2已下架") 82 * @ApiParams (name="is_up", type="inter", required=false, description="是否上架 为空是全部1已上架2已下架")
83 - * 83 + * @ApiParams (name="keyword", type="string", required=false, description="关键字")
84 * 84 *
85 * @ApiReturn({ 85 * @ApiReturn({
86 "code": 1, 86 "code": 1,
@@ -109,12 +109,19 @@ class Index extends Api @@ -109,12 +109,19 @@ 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 + $keyword = $this->request->param('keyword');
  113 + if(!empty($keyword)){
  114 + $where['folder_name'] = ['like',"%$keyword%"];
  115 + }
  116 +
112 //判断是否为全部还是 已上架/已下架 117 //判断是否为全部还是 已上架/已下架
113 if(!empty($is_up)){ 118 if(!empty($is_up)){
114 $where['is_up'] = ['eq',$is_up]; 119 $where['is_up'] = ['eq',$is_up];
115 }else{ 120 }else{
116 $where = true; 121 $where = true;
117 } 122 }
  123 +
  124 +
118 $data = Db::name('folder') 125 $data = Db::name('folder')
119 ->field('updatetime,pid',true) 126 ->field('updatetime,pid',true)
120 ->where('user_id',$user_id) 127 ->where('user_id',$user_id)