简要描述:
版本号 | 制定人 | 制定日期 | 修订日期 |
---|---|---|---|
1.0.0 | kevin | 2021-03-15 |
请求URL:
请求方式:
- GET
请求头:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
token | 是 | string | token参数 |
请求参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
goods_id | 是 | int | 商品id |
返回示例:
正确时返回:
{
"status": 200,
"msg": "成功",
"data": {
"info": {
"goods_id": 1,
"cate_id": 2,
"goods_name": "情侣女戒",
"sec_goods_name": "情侣女戒",
"cover": "http://gem.com/uploads/image/2021-06-22/60d148f13ca5c.png",
"price": 1600,
"number": "ZPK001",
"contents": "情侣女戒",
"collect": false,
"cart_num": 0,
"stock": 3,
"img": [
"http://gem.com/uploads/image/2021-06-22/60d14c585c544.png"
],
"options": [
{
"option_type_name": "尺寸",
"option_list": [
{
"option_id": 1,
"option_name": "12"
},
{
"option_id": 2,
"option_name": "14"
},
{
"option_id": 3,
"option_name": "15"
}
]
},
{
"option_type_name": "镶口",
"option_list": [
{
"option_id": 5,
"option_name": "0分"
}
]
}
]
},
"sku": [
{
"sku_id": 1,
"option_ids": [
"1",
"5"
],
"price": 1600,
"stock": 1,
"json_str_api": [
{
"key": "库存号",
"value": "X1W94502V"
},
{
"key": "材质",
"value": "红18K金"
},
{
"key": "金重",
"value": "1.7600"
},
{
"key": "总重",
"value": "1.8000"
},
{
"key": "尺寸",
"value": "12"
},
{
"key": "主石",
"value": "0/0 圆形/"
},
{
"key": "副石",
"value": "0.196ct/22p"
}
]
},
{
"sku_id": 2,
"option_ids": [
"2",
"5"
],
"price": 1620,
"stock": 1,
"json_str_api": [
{
"key": "库存号",
"value": "O1D38368K"
},
{
"key": "材质",
"value": "红18K金"
},
{
"key": "金重",
"value": "1.9000"
},
{
"key": "总重",
"value": "1.9400"
},
{
"key": "尺寸",
"value": "14"
},
{
"key": "主石",
"value": "0/0 圆形/"
},
{
"key": "副石",
"value": "0.188ct/22p"
}
]
},
{
"sku_id": 3,
"option_ids": [
"3",
"5"
],
"price": 1609,
"stock": 1,
"json_str_api": [
{
"key": "库存号",
"value": "X1L56372U"
},
{
"key": "材质",
"value": "红18K金"
},
{
"key": "金重",
"value": "1.8700"
},
{
"key": "总重",
"value": "1.9100"
},
{
"key": "尺寸",
"value": "15"
},
{
"key": "主石",
"value": "0/0 圆形/"
},
{
"key": "副石",
"value": "0.188ct/22p"
},
{
"key": "测试",
"value": "123"
}
]
}
]
},
"other": []
}
错误时返回:
{
"status": 0,
"msg": "token过期",
"data": []
}
info返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
goods_id | int | 商品id |
cate_id | int | 一级分类id |
goods_name | string | 商品名称 |
sec_goods_name | string | 次级商品名称 |
cover | string | 封面 |
old_price | string | 原价格 |
price | string | 折扣价格 |
pay_num | int | 购买数 |
tig | array | 标记 1=新品 2=推荐 3=特价 |
number | string | 商品编号 |
contents | string | 商品详情 |
pay_num | string | 购买数 |
cart_num | string | 购物车数量 |
collect | bool | 是否收藏 |
img | array | 图片轮播图 |
options.option_type_name | string | 一级选项 |
options.option_list.option_id | int | 二级选项id |
options.option_list.option_name | string | 二级选项名称 |
sku返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
sku_id | int | 库存id |
key | string | 选项id组【每个二级选项,选择一个后,对比这个就能拿到价格和库存】 |
title | string | 标题 |
price | string | 价格 |
stock | string | 库存 |
cover | string | 封面 |
备注:
- 无
文档更新时间: 2021-06-23 11:39 作者:admin