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

修改过期时间

... ... @@ -592,6 +592,68 @@ class Index extends Api
}
/**
* @ApiTitle (传入类型获取对应的数据)
* @ApiSummary (传入类型获取对应的数据)
* @ApiMethod (POST)
* @ApiRoute (/api/index/typelist)
*
* @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": {
"note": [
{
"times": //时间,
"info": [
{
"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 typelist()
{
$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);
$sundry = $this->sundry($gong);
$this->success('success',$sundry);
}
//通过传入类型获取我自己的不同文件
public function myfile($type,$where){
... ...