...
|
...
|
@@ -213,12 +213,12 @@ orderHammer.on('tap', function(e) { |
|
|
orderCode: orderCode
|
|
|
},
|
|
|
success: function(data) {
|
|
|
var lucky = data.data.orderLotteryCode;
|
|
|
switch(lucky){
|
|
|
var luck = data.data.orderLotteryCode;
|
|
|
switch(luck){
|
|
|
case 0:
|
|
|
break;
|
|
|
case 1:
|
|
|
lucky();
|
|
|
lucky(data);
|
|
|
break;
|
|
|
case 2:
|
|
|
unlucky();
|
...
|
...
|
@@ -231,13 +231,16 @@ orderHammer.on('tap', function(e) { |
|
|
break;
|
|
|
}
|
|
|
// 中奖
|
|
|
function lucky() {
|
|
|
function lucky(data) {
|
|
|
var message = data.data.orderLotteryMessage;
|
|
|
var bgPic = data.data.prize.image;
|
|
|
$('.lucky').show();
|
|
|
$('.dia-c').show();
|
|
|
$('.dia-main').find('p').show();
|
|
|
var dia_h = $('.dia-main').height() / 2;
|
|
|
$('.dia-main').css('margin-top', '-' + dia_h + 'px');
|
|
|
$('.dia-main').find('.code').text(orderCode);
|
|
|
$('.dia-main').find('.message').text(message);
|
|
|
$('.dia-main').find('.lucky').css("background-image","url(" + bgPic + ")");
|
|
|
}
|
|
|
// 未中奖
|
|
|
function unlucky() {
|
...
|
...
|
@@ -330,10 +333,6 @@ $(window).scroll(function() { |
|
|
getOrders();
|
|
|
|
|
|
$(function() {
|
|
|
$('.dia-main').on('click', function () {
|
|
|
window.location.href = '//m.yohobuy.com/activity/raffle/orders'
|
|
|
});
|
|
|
|
|
|
if ($('.dia-tip').length > 0) {
|
|
|
if(window.cookie('bindUrl') == 'http://m.yohobuy.com/passport/bind/success?type=bind') {
|
|
|
userId = $('.dia-tip').val();
|
...
|
...
|
@@ -442,5 +441,9 @@ $reaMask.on('touchend', function(event) { |
|
|
});
|
|
|
|
|
|
$('.dia-c .close').on('click', function() {
|
|
|
$('.dia-c').hide();
|
|
|
window.location.href = '//m.yohobuy.com/activity/raffle/orders'
|
|
|
});
|
|
|
|
|
|
$('.dia-main a').on('click', function () {
|
|
|
window.location.href = '//m.yohobuy.com/activity/raffle/orders'
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|