ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**简要描述:** - 商品详情 **请求URL:** - ` api/goods/getGoodsDetail ` **请求方式:** - get **参数:** |参数名|是否必选|类型|说明| |:---- |:---|:----- |----- | |id |必填 |int |商品id | **返回示例** ``` { "code": 1, "msg": "获取成功", "data": { "id": 2, "name": "小米88888", "image": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/63b6e7cce6d7e2f54a926567a12b6a69.jpg", "remark": "小米88888", "content": "", "sales_sum": 90, "click_count": 31, "market_price": "1888.00", "is_collect": 0, "price": "2088.00", "order_give_integral": 2, "like": [ { "id": 2, "name": "小米88888", "price": "2088.00", "market_price": "1888.00" } ], "goods_spec": [ { "id": 3, "goods_id": 2, "name": "选择颜色", "spec_value": [ { "id": 5, "goods_id": 2, "spec_id": 3, "value": "蓝色" }, { "id": 6, "goods_id": 2, "spec_id": 3, "value": "白色" } ] }, { "id": 4, "goods_id": 2, "name": "选择版本", "spec_value": [ { "id": 7, "goods_id": 2, "spec_id": 4, "value": "4G" }, { "id": 8, "goods_id": 2, "spec_id": 4, "value": "6G" } ] } ], "goods_image": [ { "goods_id": 2, "uri": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/63b6e7cce6d7e2f54a926567a12b6a69.jpg" }, { "goods_id": 2, "uri": "http://likeshop.yixiangonline.com/uploads/images/background/20201012/a1d556e7f10a709a8c0d93b35a19dd1e.jpg" }, { "goods_id": 2, "uri": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/9ea5ac6c193ea36e7414856cbf087857.jpg" } ], "goods_item": [ { "id": 1, "goods_id": 2, "image": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/a9c7df0d62ac83b7bef97f48682fcc5c.jpg", "spec_value_ids": "5,7", "spec_value_str": "蓝色,4G", "market_price": "1888.00", "price": "2088.00", "stock": 1000 }, { "id": 2, "goods_id": 2, "image": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/45345c8657dd87dff6ce754c1b63da0c.jpg", "spec_value_ids": "5,8", "spec_value_str": "蓝色,6G", "market_price": "1888.00", "price": "2088.00", "stock": 1000 }, { "id": 3, "goods_id": 2, "image": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/a9c7df0d62ac83b7bef97f48682fcc5c.jpg", "spec_value_ids": "6,7", "spec_value_str": "白色,4G", "market_price": "1888.00", "price": "2088.00", "stock": 1000 }, { "id": 4, "goods_id": 2, "image": "http://likeshop.yixiangonline.com/uploads/images/background/20201013/45345c8657dd87dff6ce754c1b63da0c.jpg", "spec_value_ids": "6,8", "spec_value_str": "白色,6G", "market_price": "1888.00", "price": "2088.00", "stock": 1000 } ] } } ``` **返回参数说明** |参数名|类型|说明| |:----- |:-----|----- | |id |varchar |商品id |name |varchar |商品名称 |image |varchar |商品主图 |remark |varchar |商品简介 |content |varchar |商品详情 |click_count |int |商品点击量 |sales_sum |int |商品销量 |stock |int |商品总库存(true不显示库存) |price |int |商品价格 |market_price |int |商品市场价 |is_collect |int |是否收藏商品 |order_give_integral | int | 下单赠送积分 |--like|array |猜你喜欢商品 |----id |varchar |商品id |----name |varchar |商品名称 |----image |varchar |商品主图 |----price |int |商品价格 |----market_price |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 **备注** -