Commit ecccf818 by doszhang

Update index.js

parent 69bdec22
......@@ -53,19 +53,9 @@ $(document).ready(function () {
}
});
});
$('.btn-g-g-bj').on('click',function () {
$(this).hide();
});
var type;
var prize_lock = true;
$('.btn-prize').on(clickEvent, function () {
$('.page-s-c').hide();
$('.no-prize').show();
$('.page-g').show();
LuckyCard.case({
// coverColor:'#CCCCCC',
coverImg:'Public/static/images/m-c.jpg',
ratio: .3
}, function() {
$('.btn-g-g-bj').on('click',function () {
if (!prize_lock) {
return;
}
......@@ -81,15 +71,14 @@ $(document).ready(function () {
$('.page-s-c').hide();
$('.page_checking').hide();
if (resp.errcode == 0) {
this.clearCover();
if (resp.data.prize_type == 0) {
type = 0
$('#card').find('img').attr('src','Public/static/images/no-przie.jpg')
$('.m-prize').show();
$('.y-prize').hide();
}else {
type = 1
$('#card').find('img').attr('src','Public/static/images/prize-map.jpg')
$('.m-prize').hide();
$('.y-prize').show();
if(resp.data.info_type==0 || resp.data.info_type==2){
$('.btn-submit').show();
}else {
......@@ -100,8 +89,8 @@ $(document).ready(function () {
$('.address').val(resp.data.address);
}
if(resp.data.info_type==2 || resp.data.info_type==1){
my_notify('你已中过奖');
type = 2
// my_notify('你已中过奖');
}
}
}
......@@ -110,11 +99,28 @@ $(document).ready(function () {
});
});
// return;
// $('.text_').html('抽奖中,<br>莫捉急~');
// $('.page_checking').show();
$(this).hide();
});
$('.btn-prize').on(clickEvent, function () {
$('.page-s-c').hide();
$('.no-prize').show();
$('.page-g').show();
LuckyCard.case({
// coverColor:'#CCCCCC',
coverImg:'Public/static/images/m-c.jpg',
ratio: .3
}, function() {
if(type == 0){
$('.m-prize').show();
$('.y-prize').hide();
}else if(type == 2){
my_notify('你已中过奖');
}else {
$('.m-prize').hide();
$('.y-prize').show();
}
this.clearCover();
});
$('.btn-close-two').on('click',function () {
$('.page_home').hide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment