|
|
|
|
|
|
|
|
var tipMessage = $('#tipMessage').html();
|
|
|
var activityID = $('#activityID').html();
|
|
|
$('#phone').bind('input propertychange', function() {
|
|
|
var tipMessage = $('#tipMessage').html();
|
|
|
var activityID = $('#activityID').html();
|
|
|
$('#phone').bind('input propertychange', function() {
|
|
|
if ($(this).val().length === 11) {
|
|
|
$('.input-content div').eq('0').addClass('verification-code');
|
|
|
} else {
|
...
|
...
|
@@ -13,8 +11,8 @@ |
|
|
$('.input-content i').eq('0').addClass('hidden');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
$('#verification').bind('input propertychange', function() {
|
|
|
});
|
|
|
$('#verification').bind('input propertychange', function() {
|
|
|
if ($(this).val().length === 4) {
|
|
|
$('.input-content div').eq('1').addClass('get');
|
|
|
} else {
|
...
|
...
|
@@ -25,15 +23,15 @@ |
|
|
$('.input-content i').eq('1').addClass('hidden');
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
if ($('#activityEnded').html()) {
|
|
|
if ($('#activityEnded').html()) {
|
|
|
$('.tip-wrap').removeClass('hidden');
|
|
|
$('.tip-wrap .title').html(tipMessage);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
function showToast(messages, time) {
|
|
|
function showToast(messages, time) {
|
|
|
$('#dialog').removeClass('hidden');
|
|
|
$('.mask').removeClass('hidden');
|
|
|
$('#dialog .content').html('<p class="phone-error">' + messages + '<p>');
|
...
|
...
|
@@ -42,9 +40,9 @@ |
|
|
$('.mask').addClass('hidden');
|
|
|
$('#dialog .content').html(' ');
|
|
|
}, time);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$(function(){
|
|
|
$(function() {
|
|
|
|
|
|
$.ajax({
|
|
|
url: '/activity/tencentMkt/TencentMktController/getActivityInfo',
|
...
|
...
|
@@ -62,7 +60,12 @@ |
|
|
}, false);
|
|
|
}*/
|
|
|
if (data.code === 200) {
|
|
|
$('.receive-coupon-page .bg-contain img').attr('src', data.bgImg);
|
|
|
$('.receive-coupon-page .bg-contain .img1').attr('src', data.bgImg);
|
|
|
if (data.secondScreenPic) {
|
|
|
$('.receive-coupon-page .bg-contain .img2').attr('src', data.secondScreenPic);
|
|
|
} else {
|
|
|
$('.receive-coupon-page .bg-contain .img2').addClass('hidden');
|
|
|
}
|
|
|
$('.gain-coupon-centent .coupon img').attr('src', data.couponPic);
|
|
|
$('#activityEnded').text(data.ended);
|
|
|
$('#newUser').text(data.newUser);
|
...
|
...
|
@@ -76,8 +79,8 @@ |
|
|
$('.gain-coupon-centent .use-coupon-btn .use-coupon').attr('href', data.buttonLink);
|
|
|
$('.gain-coupon-centent .go-wep').attr('href', data.pcLink);
|
|
|
$('.tip .title').html(data.message);
|
|
|
$('#activityDesc').html(data.activityDesc);
|
|
|
if(data.ended) {
|
|
|
$('#activityDesc .message').html(data.formatActivityDesc);
|
|
|
if (data.ended) {
|
|
|
$('.tip-wrap').removeClass('hidden');
|
|
|
$('.tip-wrap .title').html(data.message);
|
|
|
}
|
...
|
...
|
@@ -91,11 +94,11 @@ |
|
|
error: function() {
|
|
|
showToast('网络错误,稍后再试!', 1400);
|
|
|
},
|
|
|
dataType : "json"
|
|
|
});
|
|
|
dataType: "json"
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('#getCoupon').on('click', function() {
|
|
|
$('#getCoupon').on('click', function() {
|
|
|
phone = $(this).siblings('input').val();
|
|
|
reg = /[0-9]{11}/;
|
|
|
if (!reg.test(phone)) {
|
...
|
...
|
@@ -131,10 +134,10 @@ |
|
|
error: function() {
|
|
|
showToast('网络错误,稍后再试!', 1400);
|
|
|
},
|
|
|
dataType : "json"
|
|
|
dataType: "json"
|
|
|
});
|
|
|
});
|
|
|
$('.input-content').on('click', '.get', function() {
|
|
|
});
|
|
|
$('.input-content').on('click', '.get', function() {
|
|
|
$('.input-content div').eq('1').removeClass('get');
|
|
|
if ($(this).siblings('input').val().length === 4) {
|
|
|
$.ajax({
|
...
|
...
|
@@ -163,57 +166,57 @@ |
|
|
error: function() {
|
|
|
showToast('网络错误,稍后再试!', 1400);
|
|
|
},
|
|
|
dataType : "json"
|
|
|
dataType: "json"
|
|
|
});
|
|
|
} else {
|
|
|
showToast('网络错误,稍后再试!', 1400);
|
|
|
}
|
|
|
});
|
|
|
$('.close').on('click', function() {
|
|
|
});
|
|
|
$('.close').on('click', function() {
|
|
|
$('.dialog').addClass('hidden');
|
|
|
$('.mask').addClass('hidden');
|
|
|
$('#dialog .content').html(' ');
|
|
|
});
|
|
|
$('.description-btn').on('click', function() {
|
|
|
});
|
|
|
$('.description-btn').on('click', function() {
|
|
|
$('#message').removeClass('hidden');
|
|
|
$('.mask').removeClass('hidden');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.gain-description-btn').on('click', function() {
|
|
|
$('.gain-description-btn').on('click', function() {
|
|
|
$('#message').removeClass('hidden');
|
|
|
$('.mask').removeClass('hidden');
|
|
|
});
|
|
|
$('.description').on('click', function() {
|
|
|
});
|
|
|
$('.description').on('click', function() {
|
|
|
$('#message').removeClass('hidden');
|
|
|
$('.mask').removeClass('hidden');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.use-coupon-btn').on('click', function() {
|
|
|
$('.use-coupon-btn').on('click', function() {
|
|
|
if (window._yas) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
activityID: activityID
|
|
|
}, true);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.input-content .clear-mobile').on('click', function() {
|
|
|
$('.input-content .clear-mobile').on('click', function() {
|
|
|
$('.input-content input').eq('0').val('');
|
|
|
$(this).addClass('hidden');
|
|
|
$('.input-content div').eq('0').removeClass();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.input-content .clear-verify').on('click', function() {
|
|
|
$('.input-content .clear-verify').on('click', function() {
|
|
|
$('.input-content input').eq('1').val('');
|
|
|
$(this).addClass('hidden');
|
|
|
$('.input-content div').eq('1').removeClass();
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* 分享页面基础参数
|
|
|
* @param {object} sizeInfo [接口原始数据]
|
|
|
* @return {object} [description]
|
|
|
*/
|
|
|
function getPageInfo(pageInfo) {
|
|
|
function getPageInfo(pageInfo) {
|
|
|
var dest = {};
|
|
|
|
|
|
dest.shareTitle = pageInfo.data.shareTitle;
|
...
|
...
|
@@ -229,6 +232,8 @@ |
|
|
dest.mobile = pageInfo.data.mobile;
|
|
|
dest.pcLink = pageInfo.data.pcLink;
|
|
|
dest.buttonLink = pageInfo.data.buttonLink;
|
|
|
dest.secondScreenPic = pageInfo.data.secondScreenPic;
|
|
|
dest.formatActivityDesc = pageInfo.data.formatActivityDesc;
|
|
|
|
|
|
if (pageInfo.data.flag === 1) {
|
|
|
dest.bgImg = pageInfo.data.activityNormalPic;
|
...
|
...
|
@@ -241,4 +246,4 @@ |
|
|
// 清空变量,释放内存
|
|
|
pageInfo = {};
|
|
|
return dest;
|
|
|
}; |
|
|
\ No newline at end of file |
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|