diff --git a/application/api/controller/GoodsComment.php b/application/api/controller/GoodsComment.php index bd0b6dc..9ec8838 100644 --- a/application/api/controller/GoodsComment.php +++ b/application/api/controller/GoodsComment.php @@ -104,4 +104,59 @@ class GoodsComment extends Base $this->success('筛选类型', $type); } + + /** + * @ApiWeigh (95) + * @ApiTitle (我的评价) + * @ApiSummary (我的评价) + * @ApiMethod (GET) + * + * @ApiHeaders (name=token, type=string, required=true, description="请求的token") + * + * @ApiReturn({ + "code": 1, + "msg": "我的评价", + "time": "1609221855", + "data": { + "total": 1, //数据总数 + "per_page": 10, + "current_page": 1, + "last_page": 1, + "data": [{ + "id": 1, + "goods_id": 6, + "order_id": 17, + "order_item_id": 19, + "user_id": 1, + "level": 5, + "content": "还行吧", //评价内容 + "images": [ //评价图片 + "https://yixiaoxian.qiniu.broing.cn/uploads/20201229/5c088559ebcc3f0ffcda663f04dfbeb2.png" + ], + "video": null, //评价视频 + "status": "show", + "admin_id": 0, + "reply_content": null, + "replytime": null, + "createtime": "2020-12-29", //评价时间 + "updatetime": 1609221767, + "deletetime": null, + "user": { //评价用户 + "id": 1, //用户ID + "nickname": "wn", //昵称 + "avatar": "https://thirdwx.qlogo.cn/mmopen/vi_32/C8dW9GFDHAy3wwnZwoqibeNciaN6jUZXp6QCrtjehdF3GyHickt9oiaDSibMBhATtF7f19w4AgpcQIR1Mibwu1pjYKEA/132", //头像 + "url": "/u/1" + } + }] + } + }) + */ + public function myComment() + { + $params = $this->request->get(); + + $goodsComments = \addons\shopro\model\GoodsComment::getMyList($params); + + $this->success('我的评价', $goodsComments); + } }