# LuckyDraw

LuckyDraw

# Example one:

1元红包
100元红包
0.5元红包
2元红包
10元红包
50元红包
0.3元红包
5元红包
开始
消费10积分
显示代码

# Example two:

谢谢参与
抽奖券
小元宝
抽奖券
大元宝
多元宝
抽奖券
礼物
显示代码

# Example three:

开始
抽奖
显示代码

# Example four:

谢谢参与
1个京豆
5个京豆
10个京豆
15个京豆
20个京豆
25个京豆
30个京豆
显示代码

# Example five:

开始
抽奖
显示代码

# Example six:

开始
抽奖
显示代码

# Example seven:

显示代码

# Attribute

Parameter Description Type Optional Value Default Value
ref LuckyDraw Name String -- --
config config Object width,height,padding,fontSize,fontColor,backgroundColor,backgroundImage --
btnConfig btnConfig Object width,background,fonts,imgs --
prizes prizes Array fonts,imgs,background --

# Event

Event name Description Callback parameter
start start event --
end end event result index

# Method

Method name Description parameter
play method which index be check

# config setting

Parameter Description Type Optional Value Default Value
width width Number -- --
height height Number -- --
padding padding Number -- --
fontSize fontSize String '16px' --
fontColor fontColor String '#d64737' --
backgroundColor backgroundColor String '#d64737' --
backgroundImage backgroundImage String -- --
rotate bg rotate Boolean true,false false
rollNum rollNum Number -- 6

# btnConfig setting

Parameter Description Type Optional Value Default Value
width button width Number -- --
background button bg String '#FFDCB8)' --
fonts button text Array {
text: '开始',//按钮文字
fontColor: '#1c258e',//按钮文字颜色
top: '18%',//按钮文字顶部位置
fontSize:'30px'//按钮文字大小
}
--
imgs button imgs Array {
src: '/active-eat.png',//按钮图片
width: '100%',//按钮图片大小
top: '18%',//按钮图片顶部位置
}
--

# prizes setting

Parameter Description Type Optional Value Default Value
background prizes bg String '#1c258e' --
fonts prizes text Object {
text: '草莓蛋糕',//奖品文字
top: '18%',//奖品文字顶部位置
}
--
imgs prizes imgs Object {
src:'/img/default-eat.png',//奖品图片
width:'100%',//奖品图片宽度
top:'0%'//奖品图片顶部位置
}
--
Last Updated: 3/3/2023, 10:59:23 AM