|
|
@ -17,12 +17,20 @@ function chongzhi(){ |
|
|
|
|
|
|
|
|
|
|
|
$(document).ready(function(){ |
|
|
|
$(document).ready(function(){ |
|
|
|
console.log(url) |
|
|
|
console.log(url) |
|
|
|
if(url=="twoStep"){ |
|
|
|
if(url=="twoStep"||url=="Reset"){ |
|
|
|
$('.chongzhi').addClass("stop") |
|
|
|
//$('.chongzhi').addClass("stop")
|
|
|
|
$("#Reset").on("click",function(){ |
|
|
|
$("#Reset").on("click",function(){ |
|
|
|
drawRouletteWheel() |
|
|
|
drawRouletteWheel() |
|
|
|
$("#clickButton").attr("src", "../../../assets/images/turnplate-pointer.png") |
|
|
|
$("#clickButton").attr("src", "../../../assets/images/turnplate-pointer.png") |
|
|
|
localStorage.clear(); |
|
|
|
localStorage.clear(); |
|
|
|
|
|
|
|
localStorage.setItem("Luckdraw","succed") |
|
|
|
|
|
|
|
$('.pointer').removeClass("stop") |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
$("#Reset").on("contextmenu",function(){ |
|
|
|
|
|
|
|
drawRouletteWheel() |
|
|
|
|
|
|
|
$("#clickButton").attr("src", "../../../assets/images/turnplate-pointer.png") |
|
|
|
|
|
|
|
localStorage.clear(); |
|
|
|
|
|
|
|
localStorage.removeItem("Luckdraw") |
|
|
|
$('.pointer').removeClass("stop") |
|
|
|
$('.pointer').removeClass("stop") |
|
|
|
}) |
|
|
|
}) |
|
|
|
for(var i=0;i<14;i++){ |
|
|
|
for(var i=0;i<14;i++){ |
|
|
@ -80,7 +88,7 @@ $(document).ready(function(){ |
|
|
|
drawRouletteWheel() |
|
|
|
drawRouletteWheel() |
|
|
|
}else if($(this).html().substring(0,4)=="南宁支队") |
|
|
|
}else if($(this).html().substring(0,4)=="南宁支队") |
|
|
|
{ |
|
|
|
{ |
|
|
|
turnplate.restaraunts = ["钦州吾悦广场(模板)", "龙城地下商业街(模板)", "兴安油库(模板) ","地王财富中心(模板)"]; |
|
|
|
turnplate.restaraunts = ["钦州吾悦广场(模板)", "龙城地下商业街(模板)","地王财富中心(模板)", "兴安油库(模板)"]; |
|
|
|
turnplate.colors = ["#FFEBEA", "#FF7245", "#FFEBEA", "#FF7245"]; |
|
|
|
turnplate.colors = ["#FFEBEA", "#FF7245", "#FFEBEA", "#FF7245"]; |
|
|
|
num=0 |
|
|
|
num=0 |
|
|
|
if(window.localStorage["0"]==undefined) |
|
|
|
if(window.localStorage["0"]==undefined) |
|
|
@ -625,6 +633,7 @@ $(document).ready(function(){ |
|
|
|
$("#clickButton").attr("src", "../../../assets/images/turnplate-pointer-hui.png") |
|
|
|
$("#clickButton").attr("src", "../../../assets/images/turnplate-pointer-hui.png") |
|
|
|
$("span[name='aaachen']").removeClass("stop") |
|
|
|
$("span[name='aaachen']").removeClass("stop") |
|
|
|
$('.chongzhi').removeClass("stop") |
|
|
|
$('.chongzhi').removeClass("stop") |
|
|
|
|
|
|
|
$('.chongzhi').show() |
|
|
|
//抽签完成后左侧表格点击事件
|
|
|
|
//抽签完成后左侧表格点击事件
|
|
|
|
$("span[name='aaachen']").on("click",function(){ |
|
|
|
$("span[name='aaachen']").on("click",function(){ |
|
|
|
|
|
|
|
|
|
|
@ -669,7 +678,7 @@ $(document).ready(function(){ |
|
|
|
drawRouletteWheel() |
|
|
|
drawRouletteWheel() |
|
|
|
}else if($(this).html().substring(0,4)=="南宁支队") |
|
|
|
}else if($(this).html().substring(0,4)=="南宁支队") |
|
|
|
{ |
|
|
|
{ |
|
|
|
turnplate.restaraunts = ["钦州吾悦广场(模板)", "龙城地下商业街(模板)", "兴安油库(模板) ","地王财富中心(模板)"]; |
|
|
|
turnplate.restaraunts = ["钦州吾悦广场(模板)", "龙城地下商业街(模板)","地王财富中心(模板)", "兴安油库(模板) "]; |
|
|
|
turnplate.colors = ["#FFEBEA", "#FF7245", "#FFEBEA", "#FF7245"];
|
|
|
|
turnplate.colors = ["#FFEBEA", "#FF7245", "#FFEBEA", "#FF7245"];
|
|
|
|
num=0 |
|
|
|
num=0 |
|
|
|
if(window.localStorage["0"]==undefined) |
|
|
|
if(window.localStorage["0"]==undefined) |
|
|
@ -1304,17 +1313,20 @@ $(document).ready(function(){ |
|
|
|
turnplate.bRotate = !turnplate.bRotate; |
|
|
|
turnplate.bRotate = !turnplate.bRotate; |
|
|
|
//获取随机数(奖品个数范围内)
|
|
|
|
//获取随机数(奖品个数范围内)
|
|
|
|
var item |
|
|
|
var item |
|
|
|
if(num==0||num==3||num==8||num==13||num==14||num==17||num==22||num==27) |
|
|
|
if(window.localStorage["Luckdraw"]=="succed"){ |
|
|
|
|
|
|
|
if(num==3||num==8||num==13) |
|
|
|
{ |
|
|
|
{ |
|
|
|
item=Math.floor(Math.random()*(4+1-1)+1); |
|
|
|
item=Math.floor(Math.random()*(4+1-1)+1); |
|
|
|
}else if(num==1||num==11||num==15||num==25){ |
|
|
|
}else if(num==1||num==11||num==15||num==25){ |
|
|
|
item=Math.floor(Math.random()*(2+1-1)+1); |
|
|
|
item=Math.floor(Math.random()*(2+1-1)+1); |
|
|
|
}/* else if(num==12){ |
|
|
|
} else if(num==0){ |
|
|
|
item=Math.floor(Math.random()*(3+1-1)+1); |
|
|
|
item=Math.floor(Math.random()*(3+1-1)+1); |
|
|
|
} */ |
|
|
|
}
|
|
|
|
else{ |
|
|
|
else{ |
|
|
|
item=rnd(1,turnplate.restaraunts.length); |
|
|
|
item=rnd(1,turnplate.restaraunts.length); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}else{item=Math.floor(Math.random()*(4+1-1)+1);} |
|
|
|
|
|
|
|
|
|
|
|
console.log(item) |
|
|
|
console.log(item) |
|
|
|
//奖品数量等于10,指针落在对应奖品区域的中心角度[252, 216, 180, 144, 108, 72, 36, 360, 324, 288]
|
|
|
|
//奖品数量等于10,指针落在对应奖品区域的中心角度[252, 216, 180, 144, 108, 72, 36, 360, 324, 288]
|
|
|
|
rotateFn(item, turnplate.restaraunts[item-1]); |
|
|
|
rotateFn(item, turnplate.restaraunts[item-1]); |
|
|
|