简要描述:
- 拼团活动保存
请求域名:
- http://xx.com
请求URL:
POST:route=plugin.fight-groups.admin.controllers.fight-groups.save
参数:
{
"id":1,//编辑时必须,新增时不需要
"goods_id":254,//商品id,新增时必须,编辑时不需要
"goods_name":"测试商品",//商品名称,新增时必须,编辑时不需要
"title":"经销商等级测试商品拼团",//活动名称,必须
"start_time":1559531692,//开始时间,新增时必须,编辑时不需要
"end_time":1559970936,//结束时间,新增时必须,编辑时不需要
"note":"说明111",//活动说明
"menu_show":0,//隐藏开关,0为关闭1为开启
"hide_num":4,//当参团人数达到多少时开团按钮不显示
"is_integral":0,//团长送积分,0为关闭1为开启
"integral_num":0,//送多少积分,当is_integral为1时,该字段必须
"is_lead":0,//老拉新,0为关闭1为开启
"setting":0,//拼团设置,0为关闭1为开启
"barrage":0,//弹幕设置,0为关闭1为开启
"share_title":"",//分享标题
"share_content":"",//分享内容
"desc_title":"",//详情标题
"desc_content":"",//详情内容
"has_many_level":[
{
"id":1,//层级id,编辑活动时必须
"level_num":1,//层级,新增时必须,编辑时不需要
"member_num":4,//拼团人数,新增时必须,编辑时不需要
"expire_in":3,//拼团时间,必须
},
{
"id":1,
"level_num":2,
"member_num":6,
"expire_in":4,
}
],
"has_many_options":[//活动规格,数组
{
"id":1,//活动规格id,编辑时必须
"option_id":363,//商品规格id,编辑时不需要,新增时必须,当商品无规格时,请传入0
"option_title":"红色+24寸",//商品规格名称,编辑时不需要,新增时必须,当商品无规格时,请传入:单规格
"option_price":168.90,//原价,编辑时不需要,新增时必须,当商品无规格时,请传入商品价格
"stock":101,//库存,必须,大于1,小于商品规格的库存
"buy_limit":1,//限购件数,必须,大于0,最小1
"has_many_option_level":[
{
"group_price":"1000.01",//拼团价,编辑时不需要,大于0
"member_num":3//几人团,,编辑时不需要,大于1
},
{
"group_price":"1000.02",
"member_num":8
}
]
},
{
"id":2,
"option_id":364,
"option_title":"红色+32寸",
"stock":102,
"buy_limit":2,
"has_many_option_level":[
{
"group_price":"1000.03",
"member_num":3
},
{
"group_price":"1000.04",
"member_num":8
}
]
},
{
"id":3,
"group_id":1,
"option_id":365,
"option_title":"黄色+24寸",
"stock":103,
"buy_limit":3,
"has_many_option_level":[
{
"id":5,
"groups_option_id":3,
"level_id":1,
"group_price":"1000.05",
"member_num":3
},
{
"id":6,
"groups_option_id":3,
"level_id":2,
"group_price":"1000.06",
"member_num":8
}
]
},
{
"id":4,
"group_id":1,
"option_id":366,
"option_title":"黄色+32寸",
"stock":104,
"buy_limit":4,
"has_many_option_level":[
{
"id":7,
"groups_option_id":4,
"level_id":1,
"group_price":"1000.07",
"member_num":3
},
{
"id":8,
"groups_option_id":4,
"level_id":2,
"group_price":"1000.08",
"member_num":8
}
]
}
],
}
返回示例:
{
"result": 1,
"msg": "保存成功",
"data": []
}
备注:
活动一旦创建,在编辑活动时,商品不可重新选,层级只允许修改拼团时间,规格和层级的组合中,只允许修改库存和限购件数