**简要描述:** - 获取商品详情 **请求URL:** - ` /api/goods/getGoodsDetail ` **请求方式:** - GET **参数:** |参数名|必选|类型|说明| |:---- |:---|:----- |----- | |goods_id |是 |integer |商品id | **返回示例** ``` { "code": 1, "show": 0, "msg": "获取商品详情成功", "data": { "id": 32, "name": "测试商品999", "image": "http://www.likeshopb2b2c.localhost/uploads/images/202104281813584bb6b7582.jpg", "video": "http://www.likeshopb2b2c.localhost/uploads/video/20210507110739dc4a01607.mp4", "remark": "", "content": "", "market_price": "50.00", "min_price": "3.00", "max_price": "50.00", "stock": 110, "sales_actual": 50, "sales_virtual": 0, "clicks": 30, "shop_id": 1, "update_time": 1623286757, "goods_image": [ { "goods_id": 32, "uri": "http://www.likeshopb2b2c.localhost/uploads/images/202104281813583c8187048.jpg" } ], "goods_item": [ { "id": 45, "goods_id": 32, "image": "", "spec_value_ids": "51,53", "spec_value_str": "红色,X", "market_price": "10.00", "price": "3.00", "stock": 10 }, { "id": 46, "goods_id": 32, "image": "", "spec_value_ids": "51,54", "spec_value_str": "红色,M", "market_price": "20.00", "price": "4.00", "stock": 20 }, { "id": 47, "goods_id": 32, "image": "", "spec_value_ids": "52,53", "spec_value_str": "黑色,X", "market_price": "30.00", "price": "5.00", "stock": 30 }, { "id": 48, "goods_id": 32, "image": "", "spec_value_ids": "52,54", "spec_value_str": "黑色,M", "market_price": "50.00", "price": "6.00", "stock": 50 } ], "shop": { "id": 1, "name": "一号店", "logo": "http://www.likeshopb2b2c.localhost//uploads/images/20210428155611f8ea07926.jpg", "goods_on_sale": 2, "goods_list": [ { "id": 32, "name": "测试商品999", "image": "http://www.likeshopb2b2c.localhost/uploads/images/202104281813584bb6b7582.jpg", "market_price": "50.00", "min_price": "10.00" } ] }, "sales_sum": 50, "activity": { "type": 1, "type_desc": "秒杀商品", "end_time": 1623301140 }, "is_collect": 0, "goods_spec": [ { "id": 40, "goods_id": 32, "name": " 颜色", "spec_value": [ { "id": 51, "goods_id": 32, "spec_id": 40, "value": "红色" }, { "id": 52, "goods_id": 32, "spec_id": 40, "value": "黑色" } ] }, { "id": 41, "goods_id": 32, "name": " 尺码", "spec_value": [ { "id": 53, "goods_id": 32, "spec_id": 41, "value": "X" }, { "id": 54, "goods_id": 32, "spec_id": 41, "value": "M" } ] } ], "comment": { "percent": "50%", "one": { "id": 7, "goods_comment": 3, "create_time": "2021-06-24 14:33:18", "comment": "快递太慢了……", "avatar": "http://likeshopb2b2c.yixiangonline.com//uploads/user/avatar/8907c7491667bec00d505425acd85c1b.jpeg", "nickname": "上心", "goods_name": "三星Galaxy S21 5G手机 6400万超高清120Hz超顺滑护目屏 骁龙888官方旗舰s21", "image": [ "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/20210624143307d723b7978.jpg", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/202106241433076f0ff3217.jpg", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/20210624143307a1ba22703.jpg", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/202106241433076b9592664.gif", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/20210624143307507d31909.gif", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/20210624143307579a79382.jpg", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/2021062414331679b6f2993.jpg", "http://likeshopb2b2c.yixiangonline.com//uploads/user/2/2021062414331671d6a3535.gif" ] } } } } ``` **返回参数说明** |参数名|类型|说明| |:----- |:-----|----- | |min_price |decimal|普通商品代表SKU最低价 秒杀商品代表SKU最低秒杀价 | |goods_item下的price|decimal|普通商品代表SKU价格 秒杀商品代表SKU秒杀价 | |activity|object|商品活动信息 | |activity下的type|int|商品活动类型 0-普通商品 1-秒杀商品 | |activity下的type_desc|string|商品活动类型描述 | |activity下的end_time|int|当类型为1-秒杀商品时才有,代表结束时间戳 | |percent |百分比|商品好评率 | |one |array|最新一条评论 |