💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
**简要描述:** - 商品详情 **请求URL:** - ` api/goods/getGoodsDetail ` **请求方式:** - get **参数:** |参数名|是否必选|类型|说明| |:---- |:---|:----- |----- | |id |必填 |int |商品id | **返回示例** ``` { "code": 1, "msg": "获取成功", "data": { "id": 1, "shop_id": 1, "name": "Redmi K30 5G", "image": "http://www.likeb2b2c.com:20002/uploads/images/20200703/3b15397899041396fd8443e0262854f0.jpg", "remark": "Redmi K30 5G", "content": "", "stock": 1080, "price": 1080, "market_price": 1080, "click_count": 109, "sales_sum": 0, "goods_spec": [ { "id": 1, "goods_id": 1, "name": "版本", "spec_value": [ { "id": 1, "goods_id": 1, "spec_id": 1, "value": "6GB+64GB" }, { "id": 2, "goods_id": 1, "spec_id": 1, "value": "6GB+128GB" } ] }, { "id": 2, "goods_id": 1, "name": "颜色", "spec_value": [ { "id": 3, "goods_id": 1, "spec_id": 2, "value": "花影惊鸿" }, { "id": 4, "goods_id": 1, "spec_id": 2, "value": "时光独白" }, { "id": 29, "goods_id": 1, "spec_id": 2, "value": "黑巧风暴" } ] } ], "is_collect": 1, "goods_image": [ { "goods_id": 1, "uri": "http://www.likeb2b2c.com:20002/uploads/images/20200703/3b15397899041396fd8443e0262854f0.jpg" }, { "goods_id": 1, "uri": "http://www.likeb2b2c.com:20002/uploads/images/20200703/80c063cb28fdf83247b6b1cd93eb8d3b.jpg" }, { "goods_id": 1, "uri": "http://www.likeb2b2c.com:20002/uploads/images/20200703/bbb9764412a9043ae8db9e892f413b28.jpg" }, { "goods_id": 1, "uri": "http://www.likeb2b2c.com:20002/uploads/images/20200703/934ce31932c304577091cfb24931d6eb.jpg" }, { "goods_id": 1, "uri": "http://www.likeb2b2c.com:20002/uploads/images/20200703/29a6ec6d653b84e072d2cd304719eb7d.jpg" } ], "goods_item": [ { "id": 1, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200703/3b15397899041396fd8443e0262854f0.jpg", "spec_value_ids": "1,3", "spec_value_str": "6GB+64GB,花影惊鸿", "market_price": "3499.00", "price": "50.00", "stock": 180 }, { "id": 2, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200703/3b15397899041396fd8443e0262854f0.jpg", "spec_value_ids": "1,4", "spec_value_str": "6GB+64GB,时光独白", "market_price": "3499.00", "price": "60.00", "stock": 180 }, { "id": 4, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200708/bb7a508175679071a03044e6fdf90046.jpg", "spec_value_ids": "1,29", "spec_value_str": "6GB+64GB,黑巧风暴", "market_price": "3999.00", "price": "20.00", "stock": 180 }, { "id": 22, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200703/3b15397899041396fd8443e0262854f0.jpg", "spec_value_ids": "2,3", "spec_value_str": "6GB+128GB,花影惊鸿", "market_price": "3999.00", "price": "20.00", "stock": 180 }, { "id": 24, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200703/80c063cb28fdf83247b6b1cd93eb8d3b.jpg", "spec_value_ids": "2,4", "spec_value_str": "6GB+128GB,时光独白", "market_price": "3499.00", "price": "80.00", "stock": 180 }, { "id": 25, "goods_id": 1, "image": "http://www.likeb2b2c.com:20002/uploads/images/20200708/bb7a508175679071a03044e6fdf90046.jpg", "spec_value_ids": "2,29", "spec_value_str": "6GB+128GB,黑巧风暴", "market_price": "3999.00", "price": "20.00", "stock": 180 } ], "comment": [] }, "show": 0, "time": "0.380732", } ``` **返回参数说明** |参数名|类型|说明| |:----- |:-----|----- | |id |varchar |商品id |name |varchar |商品名称 |image |varchar |商品主图 |remark |varchar |商品简介 |content |varchar |商品详情 |max_price |varchar |商品最高价 |min_price |varchar |商品最低价 |stock |int |商品总库存 |price |int |商品价格 |market_price |int |商品市场价 |is_collect |int |是否收藏商品 |goods_item |array |商品规格信息 |--id |int |规格id |--spec_value_str |varchar |规格名称 |--price |int |价格 |--stock |int |库存 |--num |int |此字段方便前端渲染选择规格的数量 |goods_spec |array |商品规格 |--id |int |规格id |--goods_id |int |商品id |--name |string |商品名称 |--spec_value |array |具体规格 |--id |int |具体规格id |--spec_id |int |规格id |--value |int |具体规格名称 |goods_image |array |商品轮播图 |--uri |varchar |轮播图uri |activity |array |活动 |--type |varchar |活动类型:1-秒杀 |--info |array |活动信息 |----id |int |活动id |----start_time |int |活动开始时间 |----end_time |int |活动结束时间 **备注** -