商品详情

商品详情。如果用户登录,则记录用户足迹以及返回用户收藏信息。

请求地址

GET https://{host}/openapi/product/detail

请求参数

属性 类型 默认值 必填 说明
x-token String 用户token

param

属性 类型 默认值 必填 说明
id int 商品id

返回值

{
  "errcode": "0",
  "errmsg": "",
  "data": {
    "specificationList": [
      {
        "name": "规格",
        "valueList": [
          {
            "id": 70,
            "goodsId": 1057036,
            "specification": "规格",
            "value": "标准",
            "picUrl": ""
          }
        ]
      }
    ],
    "groupon": [
      {
        "id": 2,
        "goodsId": 1109008,
        "goodsName": "云端沙发组合",
        "picUrl": "http://yanxuan.nosdn.127.net/c5be2604c0e4186a4e7079feeb742cee.png",
        "discount": 50.0000,
        "discountMember": 5,
        "expireTime": "2018-11-08T19:42:44.000+0000"
      }
    ],
    "issue": [
      {
        "question": "购买运费如何收取?",
        "answer": "单笔订单金额(不含运费)满88元免邮费;不满88元,每单收取10元运费。\n(港澳台地区需满"
      }
    ],
    "userHasCollect": 0,
    "shareImage": "",
    "comment": {
      "data": [],
      "count": 0
    },
    "attribute": [
      {
        "attribute": "尺寸",
        "value": "45*45cm"
      }
    ],
    "brand": {
      "id": 1001000,
      "name": "MUJI制造商",
      "brandDesc": "严选精选了MUJI制造商和生产原料,\n用几乎零利润的价格,剔除品牌溢价,\n让用户享受原品牌的品质生活。",
      "picUrl": "http://yanxuan.nosdn.127.net/1541445967645114dd75f6b0edc4762d.png",
      "sortOrder": 2,
      "floorPrice": 12.90
    },
    "productList": [
      {
        "id": 71,
        "goodsId": 1057036,
        "specifications": [
          "标准"
        ],
        "price": 79.0000,
        "number": 100,
        "url": "http://yanxuan.nosdn.127.net/8a9ee5ba08929cc9e40b973607d2f633.png"
      }
    ],
    "info": {
      "id": 1057036,
      "goodsSn": "1057036",
      "name": "日式纯色水洗亚麻抱枕",
      "categoryId": 1008002,
      "brandId": 1001000,
      "galleryList": [
        "http://yanxuan.nosdn.127.net/bec107bf0cc86dcf90fa084584d68c76.jpg",
        "http://yanxuan.nosdn.127.net/d5da1d907ce3e5dcc8cf72e925d9494b.jpg"
      ],
      "keywords": "",
      "brief": "水洗亚麻,透气亲肤",
      "isOnSale": 1,
      "picUrl": "http://yanxuan.nosdn.127.net/8a9ee5ba08929cc9e40b973607d2f633.png",
      "shareUrl": "",
      "unit": "件",
      "counterPrice": 99.00,
      "retailPrice": 79.00,
      "detail": "<p><img src=\"http://yanxuan.nosdn.127.net/6b69f7597ccffd27d77467d9d04eb294.jpg\" _src=\"http://yanxuan.nosdn.127.net/6b69f7597ccffd27d77467d9d04eb294.jpg\" style=\"\"/></p>"
    }
  }
}

参数说明

属性 类型 说明
data DATA 包含返回的数据
errcode number 错误码
errmsg string 错误信息

DATA

属性 类型 说明
info product 商品数据列表
userHasCollect int 是否收藏,0 未收藏,1 已收藏
issue list(issue) 商品问题,这里是一些通用问题
comment list(comment) 评论信息,展示两个评论
specificationList list(specificationMap) 商品规格,在购买的时候选择
productList list(productSku) 商品规格对应的数量和价格
attribute list(attribute) 商品属性
brand brand 商品品牌商
groupon groupon 团购信息

product

属性 类型 说明
id int 商品id
goodsSn String 商品编号
name String 商品名称
categoryId int 商品所属类目ID
brandId String 品牌id
galleryList String 商品宣传图片列表
keywords String 商品关键字,采用逗号间隔
brief String 商品简介
isOnSale String 是否上架
picUrl String 商品页面商品图片
shareUrl String 商品分享朋友圈图片
unit String 商品单位,例如件、盒
counterPrice BigDecimal 专柜价格
retailPrice BigDecimal 零售价格
detail String 商品详细介绍,是富文本格式

issue

属性 类型 说明
question String 常见问题
answer String 回答

comment

属性 类型 说明
count int 评论数量
data list(commentData) 评论内容列表

commentData

属性 类型 说明
id int 评论id
nickname String 评论用户名
avatar int 评论用户头像
picList list(string> 评论图片
content string 评论内容
createTime date 评论时间

specificationMap

属性 类型 说明
name String 规格名称
valueList list(specification) 规则值

specification

属性 类型 说明
id int 规格id
goodsId int 商品表的商品ID
specification String 商品规格名称
value String 商品规格值
picUrl String 商品规格图片

productSku

属性 类型 说明
id int 商品货品id
goodsId int 商品表的商品ID
specifications list(String> 商品规格值列表
price int 商品货品价格
number int 商品数量
url list(String> 商品货品图片

attribute

属性 类型 说明
attribute String 商品参数名称
value String 商品参数值

brand

属性 类型 说明
id int id
name String 品牌名称
brandDesc String 品牌介绍
picUrl String 品牌图片
floorPrice BigDecimal 最低价

groupon

属性 类型 说明
id int 团购id
goodsId int 商品表的商品ID
goodsName String 商品名称
picUrl String 商品图片或者商品货品图片
discount BigDecimal 优惠金额
discountMember int 达到优惠条件的人数
expireTime date 团购过期时间

errcode 的合法值

说明 最低版本
-1 系统错误
0 请求成功
20001 参数为空
20003 参数错误

results matching ""

    No results matching ""