简要描述:

  • 商品套餐首页接口

请求域名:

  • https://dev4.yunzshop.com

请求URL:

GET/获取商品套餐信息:route=plugin.goods-package.frontend.package.package.index

参数:

参数名 是否必须 类型 说明
package_id int 套餐ID

返回示例:

正确时返回:

  {
    "result": 1,
    "msg": "获取商品套餐成功",
    "data": {
        "id": 2,
        "uniacid": 8,
        "title": "无极剑圣",
        "thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/t4DCzb8Creg42G1HN8e1In88IR0e1Z.jpg",
        "on_sale_price": "10.00",
        "limit_time_status": 1,
        "start_time": 1550547180,
        "end_time": 1551065580,
        "status": 1,
        "share_title": "闪避突袭",
        "share_thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/QIFNYR9yYmm1yyX19z2z5K11Z55xn9.jpg",
        "share_desc": "高原血统",
        "description_title": "还可以?",
        "description_thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/VknK0crGc88GzEz990V83z8gb8ueqg.jpg",
        "description_desc": "建议尺寸640*640,或正方形图片--------------666",
        "carousels": [
            {
                "carousel_sort": "1",
                "carousel_title": "幻灯片一",
                "carousel_thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/YbVbCv66wMiGB7zCiv1g6B2rZZi2R2.jpg",
                "carousel_link": "https://dev4.yunzshop.com/addons/yun_shop/?menu#/goods/266?i=8",
                "carousel_open_status": "1"
            },
            {
                "carousel_sort": "2",
                "carousel_title": "幻灯片二",
                "carousel_thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/hkaygbNliE19n2ZuBuIMAUNmKU1bBl.jpg",
                "carousel_link": "https://dev4.yunzshop.com/addons/yun_shop/?menu#/goods/212?i=8",
                "carousel_open_status": "1"
            }
        ],
        "other_packages": [
            {
                "id": 1,
                "title": "电饭锅电饭锅",
                "thumb": "https://dev4.yunzshop.com/attachment/images/8/2019/01/Sx0B07qUxeLsO6mxOQNl368r3E3n1N.png"
            }
        ],
        "categories": [
            {
                "category_sorts": "2",
                "category_names": "Q技能",
                "category_goods_ids": "288;289;",
                "goods_list": [
                    {
                        "id": 288,
                        "type": 1,
                        "status": 1,
                        "title": "推广员测试",
                        "thumb": "https://dev4.yunzshop.com/attachment/images/8/2018/11/LzhnG5T7U9HzO2tuuOGG9Zqg7AltvZ.jpg",
                        "thumb_url": [
                            "https://dev4.yunzshop.com/attachment/images/8/2018/11/LzhnG5T7U9HzO2tuuOGG9Zqg7AltvZ.jpg"
                        ],
                        "sku": "件",
                        "market_price": "10.00",
                        "price": "100.00",
                        "stock": 2220,
                        "show_sales": 1,
                        "weight": "0.00",
                        "has_option": 1,
                        "goods_video": "",
                        "min_price": "86.00",
                        "max_price": "86.00",
                        "has_many_params": [
                            {
                                "goods_id": 288,
                                "title": "红色毛衣",
                                "value": "纯棉"
                            }
                        ],
                        "has_many_specs": [
                            {
                                "id": 171,
                                "goods_id": 288,
                                "title": "颜色",
                                "description": null,
                                "specitem": [
                                    {
                                        "id": 442,
                                        "title": "白色",
                                        "specid": 171,
                                        "thumb": ""
                                    },
                                    {
                                        "id": 443,
                                        "title": "黑色",
                                        "specid": 171,
                                        "thumb": ""
                                    }
                                ]
                            },
                            {
                                "id": 172,
                                "goods_id": 288,
                                "title": "大小",
                                "description": null,
                                "specitem": [
                                    {
                                        "id": 444,
                                        "title": "S",
                                        "specid": 172,
                                        "thumb": ""
                                    },
                                    {
                                        "id": 445,
                                        "title": "M",
                                        "specid": 172,
                                        "thumb": ""
                                    }
                                ]
                            }
                        ],
                        "has_many_options": [
                            {
                                "id": 465,
                                "goods_id": 288,
                                "title": "白色+S",
                                "thumb": "",
                                "product_price": "86.00",
                                "market_price": "98.00",
                                "stock": 555,
                                "specs": "442_444",
                                "weight": "0.00"
                            },
                            {
                                "id": 466,
                                "goods_id": 288,
                                "title": "白色+M",
                                "thumb": "",
                                "product_price": "86.00",
                                "market_price": "98.00",
                                "stock": 555,
                                "specs": "442_445",
                                "weight": "0.00"
                            },
                            {
                                "id": 467,
                                "goods_id": 288,
                                "title": "黑色+S",
                                "thumb": "",
                                "product_price": "86.00",
                                "market_price": "98.00",
                                "stock": 555,
                                "specs": "443_444",
                                "weight": "0.00"
                            },
                            {
                                "id": 468,
                                "goods_id": 288,
                                "title": "黑色+M",
                                "thumb": "",
                                "product_price": "86.00",
                                "market_price": "98.00",
                                "stock": 555,
                                "specs": "443_445",
                                "weight": "0.00"
                            }
                        ]
                    },
                    {
                        "id": 289,
                        "type": 1,
                        "status": 1,
                        "title": "推广员测试2",
                        "thumb": "https://dev4.yunzshop.com/attachment/images/8/2018/11/LzhnG5T7U9HzO2tuuOGG9Zqg7AltvZ.jpg",
                        "thumb_url": [
                            "https://dev4.yunzshop.com/attachment/images/8/2018/11/LzhnG5T7U9HzO2tuuOGG9Zqg7AltvZ.jpg"
                        ],
                        "sku": "件",
                        "market_price": "10.00",
                        "price": "100.00",
                        "stock": 100,
                        "show_sales": 0,
                        "weight": "0.00",
                        "has_option": 0,
                        "goods_video": "",
                        "has_many_params": [],
                        "has_many_specs": [],
                        "has_many_options": []
                    }
                ]
            }
        ],
        "price": "200.00"
    }
}

错误时返回:

  {
    "result": 0,
    "msg": "获取商品套餐失败"
  }
  或者
  {
    "result": 0,
    "msg": "参数错误"
  }

返回参数说明:

参数名 类型 说明
id int(10) 套餐id
uniacid int(10) 所属公众号ID
title string 套餐标题
thumb string 套餐图片路径
on_sale_price decimal 套餐优惠价格
limit_time_status int(10) 套餐限时购:0为关闭,1为开启
start_time int时间戳 限时购开始时间
end_time int时间戳 限时购结束时间
status int(10) 套餐状态:0为关闭,1为开启
share_title string 分享标题
share_thumb string 分享图标路径
share_desc string 分享描述
description_title string 图片描述
description_thumb string 描述图片路径
description_desc string 描述详情
carousels object 幻灯片列表
other_packages object 掌柜推荐列表
categories object 栏目列表
price decimal 套餐总价

关联参数幻灯片列表说明 carousels[]:

carousels参数名 类型 说明
carousel_sort int 幻灯片显示顺序序号
carousel_title string 幻灯片标题
carousel_thumb string 幻灯片图片路径
carousel_link string 幻灯片链接地址
carousel_open_status int 幻灯片状态:0为关闭,1为开启

关联参数掌柜推荐列表说明 other_packages[]:

other_packages参数名 类型 说明
id int 套餐id
title string 套餐标题
thumb string 套餐图片路径
price_sum decimal 套餐总价

关联参数栏目列表说明 categories[]:

categories参数名 类型 说明
category_sorts int 商品栏目排序
category_names string 商品栏目名称
category_goods_ids string 栏目下所有商品id的字符串拼接,id之间分号;隔开
goods_list object 栏目下的商品列表

关联参数栏目下的商品列表说明 goods_lis[]:

goods_lis参数名 类型 说明
id int 商品ID
type int 商品类型: 1为实体,2为虚拟
status int 商品状态: 1上架,0下架
title string 商品标题
thumb string 商品图片完整路径
thumb_url array 其它商品图片完整路径
sku string 商品单位(个、台、件等)
market_price float 商品市场价(元)
price float 商品金额(元)
stock int 库存
show_sales int 销量
weight float 重量
has_option int 是否有规格 1是 0否
min_price float 最小价格,只在有规格时出现
max_price float 最大价格,只在有规格时出现
goods_type int 0-普通商品 1-门店商品 2-课程商品
has_many_params object 商品参数[属性]列表
has_many_specs object 商品规格列表
has_many_options object 商品规格选项表

关联参数说明 has_many_params[]:

参数名 类型 说明
goods_id int 商品ID
title string 参数名
value string 参数值

关联规格说明 has_many_specs []:

参数名 类型 说明
id int 规格ID
goods_id int 商品ID
title string 规格名
description string 规格描述

关联Option说明 has_many_options[]:

参数名 类型 说明
id int 分享ID
goods_id int 商品ID
thumb string 图片
product_price int 价格(分)
market_price int 市场价格(分)
stock int 库存
specs string 规格项ID拼接
weight float 重量

备注:

  • 更多返回错误代码请看首页的错误代码描述