|
@@ -21,7 +21,7 @@
|
|
|
.lotteryMain{ width:100%;}
|
|
|
.lotteryBg{ width:100%; height:608px; margin:0 auto; background:url(/images/activeimages/lotteryBg.png) no-repeat top center; position:relative; overflow:hidden;background-size: 375px 508px;}
|
|
|
#run{ width:145px; height:145px; position:absolute; left:50%; top:50%; margin-left:-73px; margin-top:-53px; z-index:1; transform:rotate(0deg); -ms-transform:rotate(0deg); }
|
|
|
-#btn_run_one{ width:80px; height:80px; background:url(/images/activeimages/btn_start.png) no-repeat; border:none; outline:none; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-22px; z-index:2;cursor:pointer;background-position:0px 0px;background-size: 100% 100%;}
|
|
|
+#btn_run{ width:80px; height:80px; background:url(/images/activeimages/btn_start.png) no-repeat; border:none; outline:none; position:absolute; left:50%; top:50%; margin-left:-40px; margin-top:-22px; z-index:2;cursor:pointer;background-position:0px 0px;background-size: 100% 100%;}
|
|
|
.col-xs-12 p{
|
|
|
margin:0px 0px 5px;
|
|
|
}
|
|
@@ -33,52 +33,6 @@
|
|
|
data-target="#myModal">
|
|
|
开始
|
|
|
</button>
|
|
|
-<button class="btn btn-primary btn-lg mycode hidden" data-toggle="modal"
|
|
|
- data-target="#mycode">
|
|
|
- 开始
|
|
|
-</button>
|
|
|
-
|
|
|
-
|
|
|
-<!-- 模态框(Modal) -->
|
|
|
-<div class="modal fade" id="mycode" tabindex="-1" role="dialog"
|
|
|
- aria-labelledby="myModalLabel" aria-hidden="true" style="padding-top: 25%;">
|
|
|
- <div class="modal-dialog">
|
|
|
- <div class="modal-content">
|
|
|
-
|
|
|
- <div class="modal-header">
|
|
|
- <button type="button" class="close"
|
|
|
- data-dismiss="modal" aria-hidden="true" style="width: 40px;height: 30px;">
|
|
|
- ×
|
|
|
- </button>
|
|
|
- <h4 class="modal-title" id="myModalLabel">
|
|
|
- 企明星新年大抽奖
|
|
|
- </h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="form-group" style="margin-top:20px;">
|
|
|
- <label class="col-md-3 control-label"><span style="color:#D03102;margin-right:5px;">*</span>请输入抽奖验证码:</label>
|
|
|
- <div class="input-group col-md-6 checkCodeId">
|
|
|
- <input type="text" name="checkCodeId" class="form-control inputxt" maxlength="4" id="chedkcode" style="height:52px;">
|
|
|
- <span class="input-group-addon " id="phone-checkCodeId">
|
|
|
- <img id="phone_captcha" src="/tool/captcha" onClick="reLoadCaptcha('phone_captcha');">
|
|
|
- <a onClick="reLoadCaptcha('phone_captcha');" class="text-primary">刷新</a>
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="margin-top:20px;" class="form-group">
|
|
|
- <div class="col-sm-2"></div>
|
|
|
- <div class="col-sm-4 ">
|
|
|
- <input type="button" class="btn btn-primary" id="btn_run" value="开始抽奖">
|
|
|
- </div>
|
|
|
- <div class="col-sm-6"></div>
|
|
|
- </div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- </div>
|
|
|
- </div><!-- /.modal-content -->
|
|
|
-</div><!-- /.modal -->
|
|
|
-</div>
|
|
|
<!-- 模态框(Modal) -->
|
|
|
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
|
|
|
aria-labelledby="myModalLabel" aria-hidden="true" style="padding-top: 25%;">
|
|
@@ -105,7 +59,7 @@
|
|
|
<section class="lotteryMain">
|
|
|
<div class="lotteryBg">
|
|
|
<img id="run" src="/images/activeimages/start.png" />
|
|
|
- <input id="btn_run_one" type="button" value="" />
|
|
|
+ <input id="btn_run" type="button" value="" />
|
|
|
</div>
|
|
|
</section>
|
|
|
<div class="col-xs-12" style="color:#fff; margin-top:-135px;font-weight:600;">
|
|
@@ -119,76 +73,54 @@
|
|
|
</div>
|
|
|
<script>
|
|
|
|
|
|
-
|
|
|
-function reLoadCaptcha(){
|
|
|
- document.getElementById('phone_captcha').src='/tool/captcha?rnd='+Math.random()
|
|
|
-}
|
|
|
$(function(){
|
|
|
- $("#btn_run_one").click(function(){
|
|
|
- $(".mycode").click();
|
|
|
- });
|
|
|
var flog = {{.T.flog}};
|
|
|
if (flog == "A"){
|
|
|
$(".modal-body").html("{{.T.msg}}")
|
|
|
$(".modstart").click();
|
|
|
- $("#btn_run_one").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
+ $("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
}else if (flog == "B"){
|
|
|
$(".modal-body").html("{{.T.msg}}")
|
|
|
$(".modstart").click();
|
|
|
- $("#btn_run_one").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
+ $("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
}
|
|
|
-
|
|
|
- $("#btn_run").click(function(){
|
|
|
+ $("#btn_run").click(function(){
|
|
|
+ $("#btn_run").attr('disabled',true).css("cursor","default");
|
|
|
lottery();
|
|
|
});
|
|
|
|
|
|
-
|
|
|
});
|
|
|
function lottery(){
|
|
|
- var chedkcode = $("#chedkcode").val();
|
|
|
- if(chedkcode&&chedkcode.length==4){
|
|
|
- $.ajax({
|
|
|
- type: 'post',
|
|
|
- url: '/activity/luckdraw',
|
|
|
- data:{"checkCodeId":chedkcode},
|
|
|
- dataType: 'json',
|
|
|
- cache: false,
|
|
|
- error: function(){return false;},
|
|
|
- success:function(obj){
|
|
|
- if (obj.flog=="M"){
|
|
|
- //$("#mycode").modal("show");
|
|
|
- reLoadCaptcha();
|
|
|
- return
|
|
|
- }else if (obj.flog == "T"){
|
|
|
- $("#mycode").modal("hide");
|
|
|
- $("#run").rotate({
|
|
|
- duration:5000, //转动时间
|
|
|
- angle: 0, //默认角度
|
|
|
- animateTo:360*3+obj.rotate, //转动角度
|
|
|
- easing: $.easing.easeOutSine,
|
|
|
- callback: function(){
|
|
|
- //alert(obj.results);
|
|
|
- $(".modal-body").html(obj.msg)
|
|
|
- $(".modstart").click();
|
|
|
- $("#btn_run_one").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
- }
|
|
|
- });
|
|
|
- }else if (obj.flog=="A"){
|
|
|
- $("#mycode").modal("hide");
|
|
|
- $(".modal-body").html(obj.msg)
|
|
|
- $(".modstart").click();
|
|
|
- }else if (obj.flog=="F"){
|
|
|
- $("#mycode").modal("hide");
|
|
|
- $(".modal-body").html(" 小主来晚了,抽奖活动已过期!如果有疑问请联系企明星!")
|
|
|
- $(".modstart").click();
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
- }else{
|
|
|
- reLoadCaptcha();
|
|
|
- }
|
|
|
-
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: '/activity/luckdraw',
|
|
|
+ dataType: 'json',
|
|
|
+ cache: false,
|
|
|
+ error: function(){return false;},
|
|
|
+ success:function(obj){
|
|
|
+ if (obj.flog == "T"){
|
|
|
+ $("#run").rotate({
|
|
|
+ duration:5000, //转动时间
|
|
|
+ angle: 0, //默认角度
|
|
|
+ animateTo:360*3+obj.rotate, //转动角度
|
|
|
+ easing: $.easing.easeOutSine,
|
|
|
+ callback: function(){
|
|
|
+ //alert(obj.results);
|
|
|
+ $("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
+ $(".modal-body").html(obj.msg)
|
|
|
+ $(".modstart").click();
|
|
|
+ $("#btn_run").attr('disabled',true).css("cursor","pointer").css("background","url(/images/activeimages/btn_end.png) no-repeat").css("background-size","100% 100%");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else if (obj.flog=="A"){
|
|
|
+ $(".modal-body").html(obj.msg)
|
|
|
+ $(".modstart").click();
|
|
|
+ }else if (obj.flog=="F"){
|
|
|
+ $(".modal-body").html(" 小主来晚了,抽奖活动已过期!如果有疑问请联系企明星!")
|
|
|
+ $(".modstart").click();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
</script>
|
|
|
</body>
|