$("#inner").click(function() {
if (running)
return;
if (count >= 3) {
alert("您已经抽了 3 次奖。");
return
}
if (prize != null) {
alert("亲,你不能再参加本次活动了喔!下次再来吧~");
return
}
$.ajax({url: "index.php", dataType: "json", data: {token: "o7MB9ji5fQRsE0ZoVAMU7SlnRyMI", ac: "activityuser", tid: "5", t: Math.random()}, beforeSend: function() {
running = true;
timer = setInterval(function() {
i += 5;
outter.style.webkitTransform = 'rotate(' + i + 'deg)';
outter.style.MozTransform = 'rotate(' + i + 'deg)'
}, 1)
}, success: function(data) {
if (data.error == "invalid") {
alert("您已经抽了 3 次奖。");
count = 3;
clearInterval(timer);
return
}
if (data.error == "getsn") {
alert('本次活动你已经中过奖,本次只显示你上次抽奖结果!兑奖SN码为:' + data.sn);
count = 3;
clearInterval(timer);
prize = data.prizetype;
sncode = data.sn;
start(prizeDeg[data.prizetype - 1]);
return
}
if (data.success) {
prize = data.prizetype;
sncode = data.sn;
start(prizeDeg[data.prizetype - 1])
} else {
prize = null;
start()
}
running = false;
count++
}, error: function() {
prize = null;
start();
running = false;
count++
}, timeout: 4000})
})
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
