123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace Content\V1;
- use Dever;
- class Review
- {
- /**
- * @api {get} v1/review.list 评论列表
- * @apiVersion 1.0.0
- * @apiName review.list
- * @apiGroup Comment
- *
- * @apiDescription 评论列表
- *
- * @apiParam {Number} appid 小程序id
- * @apiParam {Number} type 评论的类型:1为资讯2为课程3为会议
- * @apiParam {Number} id 评论的类型id
- *
- * @apiSuccess {Object[]} info 小程序基本信息
- * @apiSuccess {Number} info.id 小程序id
- * @apiSuccess {String} info.name 小程序名称
- * @apiSuccess {Number} info.cate_id 小程序所属栏目id
- * @apiSuccess {String} info.logo 小程序logo
- * @apiSuccess {String} info.title 首页标题
- * @apiSuccess {String} info.pic 首页头图
- *
- * @apiSuccess {Object[]} review 评论信息
- * @apiSuccess {Number} review.id 评论id
- * @apiSuccess {String} review.content 评论内容
- * @apiSuccess {Number} review.num_up 点赞数
- * @apiSuccess {String} review.cdate 时间
- *
- * @apiSuccess {Object[]} review.user 评论用户信息
- * @apiSuccess {Number} review.user.id 用户id
- * @apiSuccess {String} review.user.pic 用户头像
- * @apiSuccess {String} review.user.name 用户昵称
- *
- * @apiSuccessExample 操作成功
- * {"status":1,"code":1,"msg":"success","data":{"uid":1,"session":"111"}}
- *
- * @apiErrorExample 操作失败
- * {"status":2,"code":1,"msg":"\u9519\u8bef\u7684\u5c0f\u7a0b\u5e8fid"}
- */
- public function list_api()
- {
- return Dever::load('comment/review.rlist');
- }
- /**
- * @api {get} v1/review.submit 提交新评论
- * @apiVersion 1.0.0
- * @apiName review.submit
- * @apiGroup Comment
- *
- * @apiDescription 用户提交新评论接口
- *
- * @apiParam {Number} appid 小程序id
- * @apiParam {Number} uid 用户id
- * @apiParam {String} session 验证用户的session
- * @apiParam {Number} type 评论的类型:1为资讯2为课程3为会议
- * @apiParam {Number} id 评论的类型id
- * @apiParam {String} content 用户提交的评论内容
- *
- * @apiSuccess {Number} id 评论id
- *
- * @apiSuccessExample 操作成功
- * {"status":1,"code":1,"msg":"success","data":1}
- *
- * @apiErrorExample 操作失败
- * {"status":2,"code":1,"msg":"\u9519\u8bef\u7684\u5c0f\u7a0b\u5e8fid"}
- */
- public function submit_api()
- {
- return Dever::load('comment/review.submit');
- }
- }
|