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

修改过期时间

... ... @@ -80,7 +80,7 @@ class Index extends Api
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="is_up", type="inter", required=false, description="是否上架 为空是全部1已上架2已下架")
*
* @ApiParams (name="keyword", type="string", required=false, description="关键字")
*
* @ApiReturn({
"code": 1,
... ... @@ -109,12 +109,19 @@ class Index extends Api
$user_id = $this->auth->id;
$is_up = $this->request->param('is_up');
$keyword = $this->request->param('keyword');
if(!empty($keyword)){
$where['folder_name'] = ['like',"%$keyword%"];
}
//判断是否为全部还是 已上架/已下架
if(!empty($is_up)){
$where['is_up'] = ['eq',$is_up];
}else{
$where = true;
}
$data = Db::name('folder')
->field('updatetime,pid',true)
->where('user_id',$user_id)
... ...