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

新增图片列表接口

... ... @@ -652,6 +652,60 @@ class Index extends Api
}
/**
* @ApiTitle (图片类型的图片数据)
* @ApiSummary (图片类型的图片数据)
* @ApiMethod (POST)
* @ApiRoute (/api/index/imagelist)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="fenlei", type="inter", required=true, description="分类id笔记1 图片2 视频3")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
"data": {
[
{
"id": //文件id,
"user_id": //用户id,
"type": //类型1笔记2图片3视频,
"name": //文件名称,
"share_url": //文件分享地址,
"images": //图片地址,
"video": //视频地址,
"content": //笔记内容,
"is_open": //是否公开1公开2私密,
"is_up": //是否上架 1上架2下架,
"createtime": //创建时间,
"is_white": //是否白名单 1是2否,
"is_real": //是否是自己的 1是2否,
"is_zhuan": //是否是转存的 1是2否,
"nowtime": //时间,
"video_image": //视频首帧图
}
],
}
})
*/
public function imagelist()
{
$user_id = $this->auth->id;
$type_id = $this->request->param('fenlei');
if(empty($type_id)){
$this->error('缺少必要参数');
}
$where['user_id'] = ['eq',$user_id];
$tiao['a.user_id'] = ['eq',$user_id];
$tiao['b.is_up'] = 1;
$myfile = $this->myfile($type_id,$where);
$zhuan = $this->zhuan($type_id,$tiao);
$gong = $this->gong($type_id,$myfile,$zhuan);
$this->success('success',$gong);
}
... ...
此 diff 太大无法显示。