Files
g.hnyhua.cn/Mtxfw.shop/choujiang_qj.aspx
2026-02-07 15:48:27 +08:00

192 lines
7.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="choujiang_qj.aspx.cs" Inherits="Mtxfw.shop.choujiang_qj" %>
<!DOCTYPE html>
<html>
<head runat="server" >
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="/css/choujiang.css" charset="utf-8" />
<script type="text/javascript" src="/scripts/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/scripts/common.js"></script>
<script type="text/javascript" src="/scripts/jQueryRotate.2.2.js"></script>
<script type="text/javascript" src="/scripts/jquery.easing.min.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div class="chouj_new06" style="height: 700px">
<div class="bj_700" id="cj_01">
<h2 style="font-size:20px; padding-top: 5px">
<em class="lel" style="color: #333">
<span>
<%if (utype == 0)
{ %>
总抽奖权:<b><%=CJQCount%></b> 个;可用抽奖权:<b><%=KYCJQCount%></b>次
<%}
else
{ %>
积分总额:<b><%=CJQCount%></b> 个;可用抽奖次数:<b><%=KYCJQCount%></b>次
<%} %>
</span>
<span>今日已抽奖:<b><%=JRCJCount %></b> 次</span>
<span>中奖金额:<i><%=ZJJE %></i> 元</span>
</em>
</h2>
<div class="bjj" id="bjj">
<div class="ly-plate">
<div class="rotate-bg"></div>
<div class="lottery-star"><img src="/images/rotate-static.png" id="lotteryBtn"></div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</div>
</form>
<script type="text/javascript">
var width = parseInt($(this).width());
if (width <= 620) {
$("#lotteryBtn").attr("src","/images/rotate-static2.png");
}
var d5=0;
$(function () {
var timeOut = function () {
//超时函数
$("#lotteryBtn").rotate({
angle: 0, duration: 10000, animateTo: 2160, //这里是设置请求超时后返回的角度所以应该还是回到最原始的位置2160是因为我要让它转6圈就是360*6得来的
callback: function () {
alert('网络超时')
}
});
};
var ErrOut = function (data) {
//超时函数
$("#lotteryBtn").rotate({
angle: 0, duration: 10000, animateTo: 2160, //这里是设置请求超时后返回的角度所以应该还是回到最原始的位置2160是因为我要让它转6圈就是360*6得来的
callback: function () {
alert(data);
}
});
};
var rotateFunc = function (awards, angle, text) {
//awards:奖项angle:奖项对应的角度
$('#lotteryBtn').stopRotate();
$("#lotteryBtn").rotate({
angle: 0, duration: 5000, animateTo: angle + 1440, //angle是图片上各奖项对应的角度1440是我要让指针旋转4圈。所以最后的结束的角度就是这样子^^
callback: function () {
alert(text);
self.location = self.location.toString();
}
});
};
$("#lotteryBtn").rotate({
bind: {
click: function () {
<%if (utype == 0)
{ %>
<%if(KYCJQCount>0){ %>
<%if(JRCJQCount>0){ %>
$.post("/Ajax.ashx", { action: "qoujiang", t:<%=utype%> }, function (data) {
if (data.indexOf("恭喜您") != -1) {
var adata=data.split("|");
if (adata[1] == "1") {
rotateFunc(1, 157, adata[0]);
}
if (adata[1] == "2") {
rotateFunc(2, 247, adata[0]);
}
if (adata[1] == "3") {
rotateFunc(3, 337, adata[0]);
}
if (adata[1] == "4") {
rotateFunc(3, 67, adata[0]);
}
if (adata[1] == "5") {
var r5=22;
if(d5==1){
r5=202;
}else if(d5==2){
r5=292;
}else if(d5==3){
r5=112;
}
rotateFunc(3, r5, adata[0]);
d5+=1;
}
//self.location = self.location.toString();
}else{
ErrOut(data);
}
});
<%}else{ %>
ErrOut('您今日的抽奖权已经用完了,赶紧消费吧,^-^');
<%} %>
<%}else{ %>
ErrOut('您没有抽奖权了,赶紧消费吧,^-^');
<%} %>
<%}else{ %>
<%if(KYCJQCount>0){ %>
/*var time = [0, 1];
time = time[Math.floor(Math.random() * time.length)];
if (time == 0) {
timeOut();
//网络超时
}
if (time == 1) {*/
$.post("/Ajax.ashx", { action: "qoujiang", t:<%=utype%> }, function (data) {
if (data.indexOf("恭喜您") != -1) {
var adata=data.split("|");
if (adata[1] == "1") {
rotateFunc(1, 157, adata[0]);
}
if (adata[1] == "2") {
rotateFunc(2, 247, adata[0]);
}
if (adata[1] == "3") {
rotateFunc(3, 337, adata[0]);
}
if (adata[1] == "4") {
rotateFunc(3, 67, adata[0]);
}
if (adata[1] == "5") {
var r5=22;
if(d5==1){
r5=202;
}else if(d5==2){
r5=292;
}else if(d5==3){
r5=112;
}
rotateFunc(3, r5, adata[0]);
d5+=1;
}
//self.location = self.location.toString();
}else{
ErrOut(data);
}
});
<%}else{ %>
ErrOut('您的积分不足了,赶紧消费吧,^-^');
<%} %>
<%} %>
}
}
});
})
</script>
</body>
</html>