正在显示
2 个修改的文件
包含
54 行增加
和
0 行删除
@@ -652,6 +652,60 @@ class Index extends Api | @@ -652,6 +652,60 @@ class Index extends Api | ||
652 | } | 652 | } |
653 | 653 | ||
654 | 654 | ||
655 | + /** | ||
656 | + * @ApiTitle (图片类型的图片数据) | ||
657 | + * @ApiSummary (图片类型的图片数据) | ||
658 | + * @ApiMethod (POST) | ||
659 | + * @ApiRoute (/api/index/imagelist) | ||
660 | + * | ||
661 | + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token") | ||
662 | + * @ApiParams (name="fenlei", type="inter", required=true, description="分类id笔记1 图片2 视频3") | ||
663 | + * | ||
664 | + * @ApiReturn({ | ||
665 | + "code": 1, | ||
666 | + "msg": "成功", | ||
667 | + "time": "1571492001", | ||
668 | + "data": { | ||
669 | + [ | ||
670 | + { | ||
671 | + "id": //文件id, | ||
672 | + "user_id": //用户id, | ||
673 | + "type": //类型1笔记2图片3视频, | ||
674 | + "name": //文件名称, | ||
675 | + "share_url": //文件分享地址, | ||
676 | + "images": //图片地址, | ||
677 | + "video": //视频地址, | ||
678 | + "content": //笔记内容, | ||
679 | + "is_open": //是否公开1公开2私密, | ||
680 | + "is_up": //是否上架 1上架2下架, | ||
681 | + "createtime": //创建时间, | ||
682 | + "is_white": //是否白名单 1是2否, | ||
683 | + "is_real": //是否是自己的 1是2否, | ||
684 | + "is_zhuan": //是否是转存的 1是2否, | ||
685 | + "nowtime": //时间, | ||
686 | + "video_image": //视频首帧图 | ||
687 | + } | ||
688 | + ], | ||
689 | + } | ||
690 | + }) | ||
691 | + */ | ||
692 | + public function imagelist() | ||
693 | + { | ||
694 | + $user_id = $this->auth->id; | ||
695 | + $type_id = $this->request->param('fenlei'); | ||
696 | + if(empty($type_id)){ | ||
697 | + $this->error('缺少必要参数'); | ||
698 | + } | ||
699 | + $where['user_id'] = ['eq',$user_id]; | ||
700 | + $tiao['a.user_id'] = ['eq',$user_id]; | ||
701 | + $tiao['b.is_up'] = 1; | ||
702 | + $myfile = $this->myfile($type_id,$where); | ||
703 | + $zhuan = $this->zhuan($type_id,$tiao); | ||
704 | + $gong = $this->gong($type_id,$myfile,$zhuan); | ||
705 | + $this->success('success',$gong); | ||
706 | + } | ||
707 | + | ||
708 | + | ||
655 | 709 | ||
656 | 710 | ||
657 | 711 |
此 diff 太大无法显示。
-
请 注册 或 登录 后发表评论