获取商品详情
URL地址 | http://www.tpshop.com/index.php?m=Api&c=Goods&a=goodsInfo |
请求方式 | get |
参数列表
参数 | 是否必须 | 说明 |
id | 必须 | 商品ID |
备注:
商品促销活动信息的获取方式:
商品无规格时,促销信息默认在"activity"参数中返回,
商品多规格时, 从"获取商品促销信息"接口获取
成功示例 { "status": 1, "msg": "获取成功", "result": { "goods": { "goods_id": 1, "cat_id": 190, "extend_cat_id": 0, "goods_sn": "TP0000001", "goods_name": "vivoX21 6GB+128GB 4G全网通 全面屏 拍照手机", "click_count": 199, "brand_id": 0, "store_count": 908, "comment_count": 5, "weight": 0, "volume": 0, "market_price": "0.02", "shop_price": "0.01", "cost_price": "0.00", "price_ladder": [], "keywords": "", "goods_remark": "全新刘海屏,屏占比90.3%,3D曲面玻璃机身6GB大运存高通多核神经网络芯片,性能更强劲", "mobile_content": null, "original_img": "\/public\/upload\/goods\/2018\/04-09\/5d20aae3bd2954be026ae678ffd9ed58.png", "is_virtual": 0, "virtual_indate": 0, "virtual_limit": 0, "virtual_refund": 1, "virtual_sales_sum": 0, "virtual_collect_sum": 0, "collect_sum": 2, "is_on_sale": 1, "is_free_shipping": 1, "on_time": 1529548859, "sort": 50, "is_recommend": 1, "is_new": 0, "is_hot": 1, "last_update": 0, "goods_type": 2, "spec_type": 2, "give_integral": 20, "exchange_integral": 0, "suppliers_id": 0, "sales_sum": 33, "prom_type": 0, "prom_id": 0, "commission": "0.00", "spu": "", "sku": "", "template_id": 3, "video": "", "goods_images": [{//商品图片 "img_id": 1, "goods_id": 1, "image_url": "\/public\/upload\/goods\/2018\/04-09\/5d20aae3bd2954be026ae678ffd9ed58.png" }, { "img_id": 2, "goods_id": 1, "image_url": "\/public\/upload\/goods\/2018\/04-09\/db91d22adb5bdd4a651b820b3c8f196c.png" }, { "img_id": 3, "goods_id": 1, "image_url": "\/public\/upload\/goods\/2018\/04-09\/620d40fa02bcd43c560d3eefcfb0432e.png" }, { "img_id": 4, "goods_id": 1, "image_url": "\/public\/upload\/goods\/2018\/04-09\/d96fb77b4b031933c7d50d9e5d4dba34.png" }], "goods_attr": [],//商品属性 "spec_goods_price": [{//商品规格库存价格 "item_id": 274, "goods_id": 1, "key": "9_11_16", "key_name": "选择版本:全网通3G+32G 选择颜色:红色 套餐类型:套餐一", "price": "0.01", "cost_price": "0.00", "commission": "0.00", "store_count": 57, "bar_code": "", "sku": "8999999", "spec_img": "", "prom_id": 0, "prom_type": 0 }, { "item_id": 275, "goods_id": 1, "key": "9_12_16", "key_name": "选择版本:全网通3G+32G 选择颜色:铂光色 套餐类型:套餐一", "price": "0.01", "cost_price": "0.00", "commission": "0.00", "store_count": 67, "bar_code": "", "sku": "8999997", "spec_img": "", "prom_id": 0, "prom_type": 0 }], "comment_statistics": {//商品好评数,好评率 "img_sum": "3", "high_sum": "4", "center_sum": "1", "low_sum": "0", "total_sum": 5, "high_rate": 80, "center_rate": 20, "low_rate": 0 }, "spec": [{//商品规格项 "id": 3, "type_id": 2, "name": "选择版本", "order": 50, "is_upload_image": 0, "search_index": 1, "spec_item": [{ "id": 9, "spec_id": 3, "item": "全网通3G+32G", "order_index": 0 }, { "id": 10, "spec_id": 3, "item": "全网通4G+64G", "order_index": 0 }] }, { "id": 4, "type_id": 2, "name": "选择颜色", "order": 50, "is_upload_image": 0, "search_index": 1, "spec_item": [{ "id": 11, "spec_id": 4, "item": "红色", "order_index": 0 }, { "id": 12, "spec_id": 4, "item": "铂光色", "order_index": 0 }, { "id": 13, "spec_id": 4, "item": "极光色", "order_index": 0 }] }, { "id": 5, "type_id": 2, "name": "套餐类型", "order": 50, "is_upload_image": 0, "search_index": 1, "spec_item": [{ "id": 16, "spec_id": 5, "item": "套餐一", "order_index": 0 }, { "id": 17, "spec_id": 5, "item": "套餐二", "order_index": 0 }] }] }, "prom_order": [{//订单促销活动 "id": 34, "name": "45", "type": 1, "money": 454, "expression": "20.36", "description": "", "start_time": 1529997966, "end_time": 1535181966, "is_close": 0, "group": "", "prom_detail": "订单满454元减20.36元" }, { "id": 35, "name": "3434", "type": 3, "money": 100, "expression": "88", "description": "232332<\/p>", "start_time": 1534302000, "end_time": 1539479719, "is_close": 0, "group": "", "prom_detail": "订单满100元送gggg优惠券¥10.00" }] } } 失败示例 { "status": 0, "msg": "此商品不存在或者已下架" }
附1图 spec_goods_price 键值对价格表