简要描述:
请求域名:
请求URL:
plugin.lucky-draw.frontend.draw.index
参数:
参数名 |
是否必须 |
类型 |
说明 |
lotteryId |
是 |
int |
抽奖活动id |
返回示例:
{
"result": 1,
"msg": "成功!",
"data": {
"point": {
"uid": 1,
"credit1": "132454.70",
"avatar_image": "images/3/2019/01/GgO2sdn92IyDXSKd3IAYFzIGIXi227.jpg",
"username": null
},
"list": [
{
"id": 1,
"uniacid": 3,
"member_id": 1,
"prize_id": 3,
"point": 10,
"love": null,
"amount": null,
"coupon_id": null,
"created_at": null,
"updated_at": null,
"has_one_prize": {
"id": 3,
"uniacid": 3,
"name": "三等奖",
"type": 3,
"coupon_id": 0,
"point": 0,
"love": 10,
"amount": 0,
"thumb": null,
"thumb_url": "http://dev.weifeng.com/static/upload/image/53c7b5df48f1418ca1143493c0395e5c.png",
"prize_num": 20,
"chance": 30,
"created_at": "2019-07-09 18:33:16",
"updated_at": "2019-07-09 18:33:16",
"has_one_coupon": null
}
},
{
"id": 2,
"uniacid": 3,
"member_id": 1,
"prize_id": 2,
"point": 10,
"love": null,
"amount": null,
"coupon_id": null,
"created_at": null,
"updated_at": null,
"has_one_prize": {
"id": 2,
"uniacid": 3,
"name": "二等奖",
"type": 2,
"coupon_id": 0,
"point": 10,
"love": 0,
"amount": 0,
"thumb": null,
"thumb_url": "http://dev.weifeng.com/static/upload/image/728a671eb472a51da7308e414f98f954.jpg",
"prize_num": 20,
"chance": 20,
"created_at": "2019-07-09 18:32:56",
"updated_at": "2019-07-09 18:32:56",
"has_one_coupon": null
}
},
{
"id": 3,
"uniacid": 3,
"member_id": 1,
"prize_id": 1,
"point": null,
"love": 10,
"amount": null,
"coupon_id": null,
"created_at": null,
"updated_at": null,
"has_one_prize": {
"id": 1,
"uniacid": 3,
"name": "一等奖",
"type": 2,
"coupon_id": 0,
"point": 10,
"love": 0,
"amount": 0,
"thumb": null,
"thumb_url": "http://dev.weifeng.com/static/upload/image/e0493cf82bfc7e937eba6ef6c098bf12.jpg",
"prize_num": 20,
"chance": 10,
"created_at": "2019-07-09 18:32:28",
"updated_at": "2019-07-09 18:32:28",
"has_one_coupon": null
}
},
{
"id": 4,
"uniacid": 3,
"member_id": 1,
"prize_id": 4,
"point": null,
"love": null,
"amount": null,
"coupon_id": 1,
"created_at": null,
"updated_at": null,
"has_one_prize": {
"id": 4,
"uniacid": 3,
"name": "四等奖",
"type": 1,
"coupon_id": 1,
"point": 0,
"love": 0,
"amount": 0,
"thumb": null,
"thumb_url": "http://dev.weifeng.com/static/upload/image/d7bb26e87e47e6636add2223a721b499.jpg",
"prize_num": 20,
"chance": 5,
"created_at": "2019-07-10 09:34:57",
"updated_at": "2019-07-10 09:34:57",
"has_one_coupon": {
"id": 1,
"name": "满100减10元测试"
}
}
}
],
"activityModel": {
"id": 1,
"uniacid": 3,
"name": "抽奖活动1",
"countdown_time": [
1562601600,
1563379200
],
"role_ype": 0,
"member_type": 0,
"level_id": "0",
"draw_type": 0,
"use_point": "",
"use_love": "",
"partake_times": 0,
"days_times": "5",
"days_share_times": "2",
"somebody_times": "",
"somebody_share_times": "",
"prize_id": [
1,
1,
2,
1,
2,
3,
4
],
"empty_prize_name": "谢谢惠顾",
"empty_prize_thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"empty_prize_prompt": "没有中奖",
"jump_type": 0,
"jump_link": "",
"partake_point": "5",
"partake_love": "5",
"partake_amount": "5",
"partake_coupon_id": "",
"limit": 0,
"background": "http://dev.weifeng.com/static/upload/image/0bd18869ae02f049b888362971b4776e.jpg",
"background_colour": "#AE1A1A",
"is_logo": 0,
"is_roster": 0,
"content": "吨吨吨",
"created_at": "2019-07-09 18:33:49",
"updated_at": "2019-07-10 09:35:05"
},
"result_arr": [
{
"id": 7,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 0
},
{
"id": 1,
"prize": "一等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/e0493cf82bfc7e937eba6ef6c098bf12.jpg",
"chance": 5,
"coupon": null,
"point": 10,
"love": 0,
"amount": 0,
"prize_num": 20,
"item": 1
},
{
"id": 8,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 2
},
{
"id": 2,
"prize": "二等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/728a671eb472a51da7308e414f98f954.jpg",
"chance": 10,
"coupon": null,
"point": 10,
"love": 0,
"amount": 0,
"prize_num": 20,
"item": 3
},
{
"id": 9,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 4
},
{
"id": 3,
"prize": "三等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/53c7b5df48f1418ca1143493c0395e5c.png",
"chance": 30,
"coupon": null,
"point": 0,
"love": 10,
"amount": 0,
"prize_num": 20,
"item": 5
},
{
"id": 10,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 6
},
{
"id": 4,
"prize": "四等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/d7bb26e87e47e6636add2223a721b499.jpg",
"chance": 5,
"coupon": "满100减10元测试",
"point": 0,
"love": 0,
"amount": 0,
"prize_num": 20,
"item": 7
},
{
"id": 11,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 8
},
{
"id": 1,
"prize": "一等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/e0493cf82bfc7e937eba6ef6c098bf12.jpg",
"chance": 5,
"coupon": null,
"point": 10,
"love": 0,
"amount": 0,
"prize_num": 20,
"item": 9
},
{
"id": 12,
"prize": "谢谢惠顾",
"thumb": "http://dev.weifeng.com/static/upload/image/73a0d6b34e3a65593904dbfb3e7def28.jpg",
"jump_type": 0,
"jump_link": "",
"chance": 5.8333333333333,
"item": 10
},
{
"id": 2,
"prize": "二等奖",
"thumb_url": "http://dev.weifeng.com/static/upload/image/728a671eb472a51da7308e414f98f954.jpg",
"chance": 10,
"coupon": null,
"point": 10,
"love": 0,
"amount": 0,
"prize_num": 20,
"item": 11
}
]
}
}
错误时返回:
{
"result": 0,
"msg": "活动不存在或已删除!",
"data": []
}
{
"result": 0,
"msg": "不在活动时间内!",
"data": []
}
{
"result": 0,
"msg": "您今天的抽奖次数已用完!",
"data": []
}
{
"result": 0,
"msg": "您的抽奖次数已用完!",
"data": []
}
{
"result": 0,
"msg": "参与用户身份不正确, 没有资格",
"data": []
}
{
"result": 0,
"msg": "用户积分不足!",
"data": []
}
{
"result": 0,
"msg": "用户爱心值不足!",
"data": []
}
返回data.point(我的积分)参数说明:
参数名 |
类型 |
说明 |
credit1 |
string |
积分 |
返回data.record(我的中奖记录)参数说明:
参数名 |
类型 |
说明 |
point |
string |
积分 |
love |
string |
爱心值 |
amount |
string |
余额 |
data.record.data.has_one_coupon.name |
string |
优惠卷名称 |
返回data.list(中奖名单)参数说明:
参数名 |
类型 |
说明 |
point |
string |
积分 |
love |
string |
爱心值 |
amount |
string |
余额 |
data.record.data.has_one_coupon.name |
string |
优惠卷名称 |
返回data.activityModel(活动)参数说明:
参数名 |
类型 |
说明 |
name |
string |
活动名称 |
countdown_time |
string |
活动时间 |
content |
string |
活动介绍 |
background |
string |
背景图 |
background_colour |
string |
背景色 |
jump_type |
string |
跳转类型0无跳转/1有跳转 |
jump_link |
string |
跳转链接 |
is_roster |
string |
是否展示中奖名单0不展示/1展示 |
is_logo |
string |
商家logo 0不展示/1展示 |
返回data.result_arr(奖品数组)参数说明:
参数名 |
类型 |
说明 |
prize |
string |
奖品名称 |
thumb_url |
string |
奖品图片 |
coupon |
string |
优惠卷名称 |
point |
string |
积分 |
love |
string |
爱心值 |
amount |
string |
余额 |
返回data.surplus_time(次数)参数说明:
参数名 |
类型 |
说明 |
surplus_time |
string |
抽奖次数 |
返回data.shop_logo(logo)参数说明:
参数名 |
类型 |
说明 |
shop_logo |
string |
商城logo |
备注: