简要描述:

  • 订单商品评论接口

请求域名:

  • http://yunzshop.com

请求URL:

POST:route=goods.comment.get-order-goods-comment

参数:

参数名 是否必须 类型 说明
comment_id int 评论主键ID
goods_id int 商品ID
order_id int 订单ID,0为虚拟评论

返回示例:

正确时返回(虚拟评论):

{
    "result": 1,
    "msg": "获取评论数据成功!",
    "data": {
        "id": 5,
        "uniacid": 1,
        "order_id": 0,
        "goods_id": 231,
        "uid": 0,
        "nick_name": "",
        "head_img_url": "images/1/2020/07/RbqOOevX63Fd2PXxqIqDodqv6ps11i.jpg",
        "content": "测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试",
        "level": 5,
        "images": [],
        "comment_id": 0,
        "reply_id": 0,
        "reply_name": null,
        "type": 1,
        "created_at": "2020-09-18 18:11:44",
        "updated_at": "2020-09-18 18:11:44",
        "deleted_at": null,
        "plugin_id": null,
        "plugin_table_id": null,
        "has_one_order_goods": {
            "id": 231,
            "title": "测试 枕套2444   哒哒哒哒哒哒多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多",
            "thumb": "images/1/2020/09/PrOhThp2IzLY088rO892Qr8oHHVoTZ.jpg",
            "goods_price": "100.00",
            "total": 1,
            "status_name": null
        },
        "append": null,
        "type_name": "评论",
        "has_many_reply": []
    },
    "validate_page": {
        "is_bind_mobile": 0,
        "invite_page": 0,
        "is_invite": 0,
        "is_login": 1,
        "invite_mobile": 0
    }
}

正确时返回(真实评论):

{
    "result": 1,
    "msg": "获取评论数据成功!",
    "data": {
        "id": 1,
        "uniacid": 1,
        "order_id": 17,
        "goods_id": 2,
        "uid": 163778,
        "nick_name": " ゛",
        "head_img_url": "http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaELMbapvbnic5Q2aEwvNTLVicOFPODQCqaeAHqNqwBicPmPI3oAfMKKCSvWIafwdWkiczg39EDxvwa6F8w/132",
        "content": "124345",
        "level": 5,
        "images": [
            "https://ysm-1251768088.cos.ap-guangzhou.myqcloud.com/image/ce8353e8dcaff6d837202c81b047df65.png"
        ],
        "comment_id": 0,
        "reply_id": 0,
        "reply_name": null,
        "type": 1,
        "created_at": "2019-04-16 16:44:32",
        "updated_at": "2019-04-16 16:44:32",
        "deleted_at": null,
        "plugin_id": null,
        "plugin_table_id": null,
        "append": null,
        "type_name": "评论",
        "has_many_reply": [],
        "has_one_order_goods": {
            "id": 17,
            "uniacid": 1,
            "goods_id": 2,
            "pay_sn": "",
            "total": 2,
            "create_at": 0,
            "price": "10.00",
            "goods_sn": "",
            "uid": 163778,
            "thumb": "https://dev8.yunzshop.com/static/upload/images/1/2019/04/tWMW4dK4vlxk2Zb29mGC922m82bwg2.jpg",
            "title": "测试",
            "goods_price": "100.00",
            "goods_option_id": 0,
            "goods_option_title": "",
            "product_sn": "",
            "created_at": "2019-04-16 15:56:46",
            "updated_at": "2019-04-16 16:44:32",
            "discount_price": "0.00",
            "comment_status": 1,
            "change_price": "0.00",
            "comment_id": 1,
            "goods_market_price": "100.00",
            "goods_cost_price": "100.00",
            "vip_price": "0.00",
            "coupon_price": "0.00",
            "payment_amount": "10.00",
            "deduction_amount": "0.00",
            "need_address": 0,
            "order_express_id": null,
            "buttons": []
        }
    },
    "validate_page": {
        "is_bind_mobile": 0,
        "invite_page": 0,
        "is_invite": 0,
        "is_login": 1,
        "invite_mobile": 0
    }
}

返回参数说明:

参数名 类型 说明
total int 分类总条数
per_page int 每页条数
current_page int 当前页码
last_page int 最后一页的页码 URL
next_page_url string 下一页URL
prev_page_url string 上一页URL
from int 第几条开始
to int 第几条结束
data json 评论数据
:----- :----- -----
评论数据
参数名 类型 说明
id int id
order_id int 订单ID
goods_id int 商品ID
uid uid 会员ID
nick_name string 评论人名称
head_img_url string 评论人头像
content string 评论内容
level int 评分等级
images json 评论图片
comment_id int 主评论ID
reply_id int 回复人ID
reply_name string 回复人名称
type int 1:评论 2:回复 3:追加
type_name string 类型名称
created_at string 评论时间
追加评论数据 data.append
回复评论数据 data.has_many_reply
商品名称 data.has_one_order_goods.title
商品图片 data.has_one_order_goods.thumb
价格 data.has_one_order_goods.goods_price
数量 data.has_one_order_goods.total

错误时返回:

{
    "result": 0,
    "msg": "获取评论失败!未检测到评论ID!",
    "data": []
}

备注:

  • 更多返回错误代码请看首页的错误代码描述