获取商品详情
开发中
GET
/product/{id}
请求参数
Path 参数
id
integer
商品ID
示例值:
1
Header 参数
authori-zation
string
token
示例值:
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LnByby53dWh0Lm5ldCIsImF1ZCI6InRlc3QucHJvLnd1aHQubmV0IiwiaWF0IjoxNjQ5NzQ2MjAyLCJuYmYiOjE2NDk3NDYyMDIsImV4cCI6MTY1MDM1MTAwMiwianRpIjp7ImlkIjoxLCJ0eXBlIjoiYWRtaW4ifX0.-xDXOdYfBNsu3IqF3nMO_E_fop2lxkwNw25fdQpzGVQ
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/product/1' \
--header 'authori-zation: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ0ZXN0LnByby53dWh0Lm5ldCIsImF1ZCI6InRlc3QucHJvLnd1aHQubmV0IiwiaWF0IjoxNjQ5NzQ2MjAyLCJuYmYiOjE2NDk3NDYyMDIsImV4cCI6MTY1MDM1MTAwMiwianRpIjp7ImlkIjoxLCJ0eXBlIjoiYWRtaW4ifX0.-xDXOdYfBNsu3IqF3nMO_E_fop2lxkwNw25fdQpzGVQ'
返回响应
🟢200成功
application/json
Body
status
integer
状态码
msg
string
信息描述
data
object
返回值
id
integer
商品ID
image
string
商品图片
slider_image
array[string]
轮播图
store_name
string
商品名称
store_info
string
商品简介
keyword
string
关键字
bar_code
string
商品编码
cate_id
array[integer]
商品分类ID
price
string
售价
ot_price
string
原价
postage
string
邮费
unit_name
string
单位名称
sort
integer
排序
is_show
integer
上架状态
cost
string
成本价
spec_type
integer
规格类型
spu
string
商品SPU
freight
integer
运费设置
is_vip
integer
是否开启会员价格
vip_price
string
会员专享价
is_limit
integer
是否开启限购
limit_type
integer
限购类型
limit_num
integer
限购数量
give_integral
integer
赠送积分
cate_name
string
商品分类名称
description
string
商品详情
attrs
array [object {10}]
规格数据
items
array [object {2}]
规格列表
示例
{
"status": 200,
"msg": "success",
"data": {
"id": 78,
"image": "https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
"slider_image": [
"https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
"https://data44.wuht.net//uploads/attach/2022/01/15/6fc4a434065f9b20da5d68e2b7915069.jpg",
"https://data44.wuht.net//uploads/attach/2022/01/15/1d6a58df8f136925bffa326b22a59d1a.jpg",
"https://data44.wuht.net//uploads/attach/2022/01/15/80475fb57727e34049b902efa8bcdf4f.jpg"
],
"store_name": "美的(Midea)电磁炉 旋控调节火力 C22-RX22H0107",
"store_info": "美的xxxxx",
"keyword": "电磁炉 美的",
"bar_code": "",
"cate_id": [
4,
8
],
"price": "100.00",
"ot_price": "80.00",
"postage": "0.00",
"unit_name": "件",
"sort": 0,
"is_show": 1,
"cost": "90.00",
"spec_type": 1,
"spu": "9752575478640",
"freight": 3,
"is_vip": 0,
"vip_price": "9.00",
"is_limit": 0,
"limit_type": 0,
"limit_num": 0,
"give_integral": 0,
"cate_name": "精品发卡,品牌电脑",
"description": "<p>详情</p>",
"items": [
{
"value": "锅型",
"detail": [
"大面版",
"火锅必备"
]
},
{
"value": "尺寸",
"detail": [
"30寸",
"33寸"
]
}
],
"attrs": [
{
"value1": "大面版",
"value2": "30寸",
"detail": {
"锅型": "大面版",
"尺寸": "30寸"
},
"pic": "https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
"price": "100.00",
"cost": "90.00",
"ot_price": "80.00",
"vip_price": "9.00",
"bar_code": "MD-01",
"weight": "21.00",
"volume": "3.00",
"brokerage": "0.00",
"brokerage_two": "0.00"
},
{
"value1": "大面版",
"value2": "33寸",
"detail": {
"锅型": "大面版",
"尺寸": "33寸"
},
"pic": "https://data44.wuht.net//uploads/attach/2022/01/15/f391b023d240b73f13fe0f5d08250884.jpg",
"price": "100.00",
"cost": "90.00",
"ot_price": "80.00",
"vip_price": "11.00",
"bar_code": "MD-02",
"weight": "22.00",
"volume": "3.00",
"brokerage": "0.00",
"brokerage_two": "0.00"
},
{
"value1": "火锅必备",
"value2": "30寸",
"detail": {
"锅型": "火锅必备",
"尺寸": "30寸"
},
"pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
"price": "100.00",
"cost": "90.00",
"ot_price": "80.00",
"vip_price": "12.00",
"bar_code": "MD-03",
"weight": "23.00",
"volume": "3.00",
"brokerage": "0.00",
"brokerage_two": "0.00"
},
{
"value1": "火锅必备",
"value2": "33寸",
"detail": {
"锅型": "火锅必备",
"尺寸": "33寸"
},
"pic": "http://www.crmebstd450.test/uploads/attach/2022/06/20220625/b4d26d8fa71a7b35ad9dfe94b7956a58.jpg",
"price": "100.00",
"cost": "90.00",
"ot_price": "80.00",
"vip_price": "13.00",
"bar_code": "MD-04",
"weight": "24.00",
"volume": "3.00",
"brokerage": "0.00",
"brokerage_two": "0.00"
}
]
}
}
修改于 2022-07-13 02:42:53