文档
测试

获取商品详情

GET
http://192.168.0.101/v1/goodsDetail/3

接口描述

获取商品详情 说明:v1为路径版本,尾部为参数信息

请求参数

参数名
类型
描述
必填
id
int
所查询商品id
必填

响应参数

参数名
类型
描述
必填
errCode
int
自定义code码,详情查询状态码文档
必填
msg
string
示例:获取商品信息成功
必填
code
int
响应状态码,详情查看状态码文档
必填
row
object
商品详情数据集
必填
id
int
商品id
必填
goods_name
string
商品名
必填
gc_id
int
商品分类id
必填
goods_price
string
商品价格
必填
weight
int
商品权重
必填
goods_storage
int
库存
必填
goods_type
int
商品类型 1原料 2粉料
必填
goods_new
int
是否新品 0否 1是
必填
goods_sign
int
是否招牌 0否 1是
必填
goodImg
string
商品介绍图
必填
createtime
string
创建时间
必填
template_id
int
运费模板id
必填
is_on_sale
int
是否上架 0否 1是
必填
is_free_shopping
int
是否包邮 0否 1是
必填
check_status
int
审核状态 0未审核 1成功 2失败
必填
goods_content
string
商品详情
必填
goods_img
array
商品图片数据集
必填
id
int
商品组图id
必填
goods_id
int
商品id
必填
goods_img
string
商品图片链接
必填
goods_template
object
商品运费数据集
必填
id
int
运费模板id
必填
template_name
string
模板名称
必填
type
int
计价方式 0 件数;1 商品重量;2 商品体积
必填
unit_price
string
起步价
必填
createtime
string
模板创建时间
必填
goods_attr
array
商品组合类目数据集
必填
id
int
自增id
必填
goods_id
int
商品id
必填
attr_id
int
属性id
必填
attr_value
string
属性值
必填
attr_storage
int
分类库存
必填
attr_price
string
分类价格
必填
createtime
string
创建时间
必填
goods_activities
object
商品活动数据集
必填
id
int
自增id
必填
goods_id
int
商品id
必填
value
int
购买值
必填
give_value
int
给予值
必填
createtime
string
创建时间
必填
acti_id
int
活动id
必填
start_time
string
活动开始时间
必填
end_time
string
活动结束时间
必填
get_activity
object
商品活动分类数据集
必填
id
int
自增id
必填
act_name
string
活动名
必填
createtime
string
创建时间
必填
acti_type
int
优惠类型 0数量优惠 1价格优惠
必填
act_content
string
优惠说明
必填
goods_sale_price
string
商品折扣价 非必填项,有折扣则显示该字段信息
必填

说明 / 示例

{ "errCode": 1000, "msg": "获取商品信息成功", "row": { "id": 3, "goods_name": "牛肉汤料", "gc_id": 2, "goods_price": "10.00", "weight": 99, "goods_storage": 100, "goods_type": 1, "goods_new": 0, "goods_sign": 0, "goodImg": "http://qiniu.emjiayuan.com/upload_file/ems/2018071610161252234", "createtime": "2020-04-30 15:00:00", "template_id": 1, "is_on_sale": 0, "is_free_shopping": 0, "check_status": 0, "goods_content": "http://qiniu.emjiayuan.com/products_detail1530526101795", "goods_img": [ { "id": 1, "goods_id": 3, "goods_img": "http://qiniu.emjiayuan.com/products_headimg1514881411870" }, { "id": 2, "goods_id": 3, "goods_img": "http://qiniu.emjiayuan.com/products_headimg1520488073824" } ], "goods_template": { "id": 1, "template_name": "顺丰快递", "type": 0, "unit_price": "12.00", "createtime": "2020-04-30 08:20:15" }, "goods_attr": [ { "id": 1, "goods_id": 3, "attr_id": 0, "attr_value": "北方汤料", "attr_storage": 50, "attr_price": "10.00", "createtime": "2020-04-30 20:25:36" }, { "id": 2, "goods_id": 3, "attr_id": 0, "attr_value": "南方调料", "attr_storage": 50, "attr_price": "10.00", "createtime": "2020-04-30 20:58:25" } ], "goods_activities": { "id": 1, "goods_id": 3, "value": 1, "give_value": 1, "createtime": "2020-04-30 18:20:15", "acti_id": 1, "start_time": "2020-04-30 10:47:03", "end_time": "2020-05-30 10:47:18", "get_activity": { "id": 1, "act_name": "赠品", "createtime": "2020-04-30 16:50:32", "acti_type": 1, "act_content": "买一件送一件" } }, "goods_sale_price": "5.00" } }