文档
测试

单个商品评价列表

GET
/user/comments

接口描述

获取单个{门店、商品、路线}评论列表

请求参数

参数名
类型
描述
必填
object_id
string
post表评论内容 id ,包括store表门店ID 、goods表商品ID
必填
table_name
string
内容所在表名:goods_post {路线、商品} 、store 门店 、comment 文章
必填
page
string
分页查询 [可选]如:2,3
必填
order
使用方法 '-create_time' "-"等于desc,"+"等于asc
必填

说明 / 示例

{ "code": 1, "msg": "评论获取成功!", "data":{ "datas":[//我的评论 字段详情见数据字典 {"id": 2, "parent_id": 0, "user_id": 1, "to_user_id": 0, "object_id": 0,…}, { "id": 1, "parent_id": 0, "user_id": 1, "to_user_id": 1, "object_id": 0, "create_time": 0, "full_name": "", "email": "", "path": "", "url": null, "content": "", "more": null, "to_user":{"id": 1, "user_type": 1, "sex": 0, "birthday": 0, "last_login_time": 1501066360,…} //to_user_id用户信息 详情见数据字典 } ] } }

小程序代码

api.get({ url: 'user/comments', data: { page: 1, object_id: 1, table_name:'goods_post' }, success: data => { console.log(data); }, complete: () => { } });

接口示咧地址

https://www.lzjia.com/api/index.php/user/comments?object_id=5&table_name=comment&page=1&order=-create_time ![image.png](https://easydoc-1255322048.image.myqcloud.com//cover/sbvoo3pgynk00000.png)