eiop-lottery-wwl
v1.0.1
Published
## Project setup ``` npm install eiop-lottery-wwl ``` ## use method ``` import eiopLottery from 'eiop-lottery-wwl' import 'eiop-lottery-wwl/lib/main.min.css' eiopLottery({ showType:1,//调用方法类型 awardType:1//活动类型 1-老虎机 2-九宫格 // isAward:中奖情况 }) //
Readme
eiop-lottery-wwl
Project setup
npm install eiop-lottery-wwluse method
import eiopLottery from 'eiop-lottery-wwl'
import 'eiop-lottery-wwl/lib/main.min.css'
eiopLottery({
showType:1,//调用方法类型
awardType:1//活动类型 1-老虎机 2-九宫格
// isAward:中奖情况
})
// 这是一个全局回调方法
window.callBackFn = params =>{
console.log("点了老虎机之后的操作,并且接到了点了老虎机传过来的参数params",params)
}
setTimeout(()=>{
const isAward = eiopLottery({showType:2,awardType:1,isAward:'3'});
if(isAward&&isAward=="0"){
alert("未中奖")
}else if(isAward=="1"){
alert("中奖单个奖品")
}else if(isAward=="2"){
alert("中奖炭资源")
}else if(isAward=="3"){
alert("中奖双资源")
}else{
alert("没返回抽奖结果,异常情况")
}
console.log(isAward,"=====isAward")
},5000)
