...
|
...
|
@@ -7,21 +7,21 @@ var $ = require('yoho-jquery'), |
|
|
|
|
|
$('#phone').bind('input propertychange', function() {
|
|
|
if ($(this).val().length === 11) {
|
|
|
$('.centent span').eq('0').addClass('verification-code');
|
|
|
$('.input-content div').eq('0').addClass('verification-code');
|
|
|
} else {
|
|
|
$('.centent span').eq('0').removeClass();
|
|
|
$('.input-content div').eq('0').removeClass();
|
|
|
}
|
|
|
});
|
|
|
$('#verification').bind('input propertychange', function() {
|
|
|
if ($(this).val().length === 4) {
|
|
|
$('.centent span').eq('1').addClass('get');
|
|
|
$('.input-content div').eq('1').addClass('get');
|
|
|
} else {
|
|
|
$('.centent span').eq('1').removeClass();
|
|
|
$('.input-content div').eq('1').removeClass();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
$('.centent').on('click', '.verification-code', function() {
|
|
|
$('.centent span').eq('0').removeClass('verification-code');
|
|
|
$('.input-content').on('click', '.verification-code', function() {
|
|
|
$('.input-content div').eq('0').removeClass('verification-code');
|
|
|
phone = $(this).siblings('input').val();
|
|
|
reg = /[0-9]{11}/;
|
|
|
if (!reg.test(phone)) {
|
...
|
...
|
@@ -47,11 +47,11 @@ $('.centent').on('click', '.verification-code', function() { |
|
|
num++;
|
|
|
if (num > 60) {
|
|
|
num = 0;
|
|
|
$('.centent span').eq('0').addClass('verification-code').html('获取验证码');
|
|
|
$('.input-content div').eq('0').addClass('verification-code').html('获取验证码');
|
|
|
clearInterval(time);
|
|
|
|
|
|
} else {
|
|
|
$('.centent span').eq('0').removeClass('verification-code').html('重新发送' + (60 - num));
|
|
|
$('.input-content div').eq('0').removeClass('verification-code').html('重新发送' + (60 - num));
|
|
|
}
|
|
|
}, 1000);
|
|
|
} else {
|
...
|
...
|
@@ -67,8 +67,8 @@ $('.centent').on('click', '.verification-code', function() { |
|
|
}
|
|
|
});
|
|
|
});
|
|
|
$('.centent').on('click', '.get', function() {
|
|
|
$('.centent span').eq('1').removeClass('get');
|
|
|
$('.input-content').on('click', '.get', function() {
|
|
|
$('.input-content div').eq('1').removeClass('get');
|
|
|
if ($(this).siblings('input').val().length === 4) {
|
|
|
$.ajax({
|
|
|
url: '/activity/cocacola/CocacolaController/validRegCodeAndSendCode',
|
...
|
...
|
@@ -109,13 +109,16 @@ $('.close').on('click', function() { |
|
|
$('.keep-out').addClass('hidden');
|
|
|
$('#dialog .content').html(' ');
|
|
|
});
|
|
|
$('.footer span').on('click', function() {
|
|
|
$('.coupon-description span').on('click', function() {
|
|
|
$('#message').removeClass('hidden');
|
|
|
$('.keep-out').removeClass('hidden');
|
|
|
});
|
|
|
$('.description').on('click', function() {
|
|
|
$('#message').removeClass('hidden');
|
|
|
$('.keep-out').removeClass('hidden');
|
|
|
});
|
|
|
|
|
|
|
|
|
$('.centent').on('click', '.get', function() {
|
|
|
$('.input-content').on('click', '.get', function() {
|
|
|
if (window._yas) {
|
|
|
window._yas.sendCustomInfo({
|
|
|
receiveCoupon: 'Y'
|
...
|
...
|
|