简要描述:
获取商品信息
请求域名:
- http://xx.com
请求URL:
POST/plugin.pc-terminal.api.home.get-goods
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
goods_type | 是 | string | recommend(推荐商品),hot(热销商品) ,new(新品商品) ,promotion(促销商品) |
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
list.data | array | 商品列表 |
id | int | 商品id |
title | string | 商品名 |
thumb | string | 商品图片 |
market_price | float | 原价 |
goodsShow | array | 页面设置信息 |
goodsShow.recommend_banner_src | string | 推荐商品页banner(绝对路径) |
goodsShow.recommend_url | string | 推荐商品页banner跳转链接 |
goodsShow.hot_banner_src | string | 热销商品页banner(绝对路径) |
goodsShow.hot_url | string | 热销商品页banner跳转链接 |
goodsShow.new_banner_src | string | 新品商品页banner(绝对路径) |
goodsShow.new_url | string | 新品商品页banner跳转链接 |
goodsShow.promotion_banner_src | string | 促销商品页banner(绝对路径) |
goodsShow.promotion_url | string | 促销商品页banner跳转链接 |
返回示例:
正确时返回的数据:
{
"result": 1,
"msg": "ok",
"data": {
"goodsShow": {
"id": 1,
"uniacid": 1,
"recommend": 1,
"recommend_banner": "",
"recommend_url": "",
"hot": 1,
"hot_banner": "newimage/6a2207001e06f86baf3dff6e24d48ff9.jpg",
"hot_url": "",
"new": 0,
"new_banner": "",
"new_url": "",
"promotion": 0,
"promotion_banner": "",
"promotion_url": "",
"created_at": "2020-12-21 16:06:29",
"updated_at": "2020-12-24 09:56:19",
"show": [
1,
2,
3
],
"recommend_banner_src": "",
"hot_banner_src": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/6a2207001e06f86baf3dff6e24d48ff9.jpg",
"new_banner_src": "",
"promotion_banner_src": ""
},
"list": {
"total": 16,
"per_page": 16,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 16,
"data": [
{
"id": 76,
"title": "希尔顿羽绒被 全棉磨毛面料 高端外贸出口产品 五星级酒店级别的白鹅",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/12/pc7lmRlHEp5l4M11957lPIYC1l1e11.jpg",
"market_price": "123.00",
"price": "123.00",
"cost_price": "123.00",
"stock": 122,
"real_sales": 1,
"show_sales": 1,
"virtual_sales": 123,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 22,
"title": "测试3",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/kC95a1h4eEA8z9eHc5feFFE5aEA57c.jpg",
"market_price": "4000.00",
"price": "0.01",
"cost_price": "3.00",
"stock": 17,
"real_sales": 17,
"show_sales": 17,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 21,
"title": "测试2",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/kC95a1h4eEA8z9eHc5feFFE5aEA57c.jpg",
"market_price": "3000.00",
"price": "1500.00",
"cost_price": "3.00",
"stock": 34,
"real_sales": 0,
"show_sales": 0,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 20,
"title": "测试1",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/kC95a1h4eEA8z9eHc5feFFE5aEA57c.jpg",
"market_price": "2000.00",
"price": "1000.00",
"cost_price": "3.00",
"stock": 34,
"real_sales": 8,
"show_sales": 8,
"virtual_sales": 0,
"has_option": 1,
"plugin_id": 0,
"status_name": null
},
{
"id": 17,
"title": "供应商",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/CKMtkg18KgmGA4kKa3PEX6D603ekDA.jpg",
"market_price": "360.00",
"price": "100.00",
"cost_price": "40.00",
"stock": 449,
"real_sales": 6,
"show_sales": 6,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 92,
"status_name": null
},
{
"id": 15,
"title": "招商等级",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/Fa7jRa3zZXwUazx7ZxK71c7MA6RPA1.png",
"market_price": "200.00",
"price": "100.00",
"cost_price": "30.00",
"stock": 259,
"real_sales": 6,
"show_sales": 6,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 14,
"title": "招商",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/B8v9VxJJDV8X00mVuVj9Vmumvv9CMl.jpg",
"market_price": "100.00",
"price": "50.00",
"cost_price": "20.00",
"stock": 517,
"real_sales": 9,
"show_sales": 9,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 13,
"title": "微店2",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/CKMtkg18KgmGA4kKa3PEX6D603ekDA.jpg",
"market_price": "200.00",
"price": "100.00",
"cost_price": "30.00",
"stock": 5468,
"real_sales": 10,
"show_sales": 10,
"virtual_sales": 1053,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 12,
"title": "微店1",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/12/Ta4Kkzhqbbk0z235k3Hkkw56c922u4.jpg",
"market_price": "100.00",
"price": "50.00",
"cost_price": "20.00",
"stock": 445,
"real_sales": 11,
"show_sales": 11,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 9,
"title": "测试商品2",
"thumb": "https://dev8.yunzshop.com/static/yunshop/goods/images/MeENCp0xX801Njdh8RNp130P8009c1.jpg",
"market_price": "120.00",
"price": "100.00",
"cost_price": "80.00",
"stock": 76,
"real_sales": 23,
"show_sales": 23,
"virtual_sales": 1,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 8,
"title": "会员测试",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/JYn1HVYG3qGvNzN1Vnq5NKIk21NiNN.jpg",
"market_price": "100.00",
"price": "50.00",
"cost_price": "20.00",
"stock": 449,
"real_sales": 51,
"show_sales": 51,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 5,
"title": "芸众小程序",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2019/04/PM343Z2Ki9UzpyYufR8YyF919I33vm.jpg",
"market_price": "2500.00",
"price": "2000.00",
"cost_price": "1800.00",
"stock": 5670,
"real_sales": 19,
"show_sales": 19,
"virtual_sales": 0,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 4,
"title": "卫目天下电子喷雾仪",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2020/01/Kb22YH4NYbh2uV2Be2BqVvCKHB4Bz2.png",
"market_price": "198.00",
"price": "59.00",
"cost_price": "12.00",
"stock": 999,
"real_sales": 10875,
"show_sales": 10875,
"virtual_sales": 200,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 3,
"title": "卫目天下护眼喷雾董事豪华礼包",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2020/02/EL9z4T271ClTJO6LU9ol2tCc2lCt13.jpg",
"market_price": "42000.00",
"price": "30000.00",
"cost_price": "10815.00",
"stock": 999,
"real_sales": 1617,
"show_sales": 1617,
"virtual_sales": 300,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 2,
"title": "卫目天下护眼喷雾总代礼包",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2020/02/In0DywOSf3FKWkF4nfkWSOyKm3iKRf.jpg",
"market_price": "8000.00",
"price": "6000.00",
"cost_price": "2060.00",
"stock": 999,
"real_sales": 1100,
"show_sales": 1100,
"virtual_sales": 500,
"has_option": 0,
"plugin_id": 0,
"status_name": null
},
{
"id": 1,
"title": "卫目天下护眼喷雾创客礼包",
"thumb": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2020/02/IRH7r73628mhszr3fqiQvmQw6HQB3r.jpg",
"market_price": "599.00",
"price": "400.00",
"cost_price": "103.00",
"stock": 999,
"real_sales": 48539,
"show_sales": 48539,
"virtual_sales": 1000,
"has_option": 0,
"plugin_id": 0,
"status_name": null
}
]
}
}
}
错误时返回:
{
"result": 0,
"msg": "",
"data": []
}
备注:
- 更多返回错误代码请看首页的错误代码描述