Authored by 张丽霞

分享领券

... ... @@ -43,13 +43,18 @@ const getUserStatus = (param) => {
dest.wrongNumb = true;
} else if (param.data.returnCode === 2) {
dest.newUser = true;
} else if (param.data.returnCode === 8) {
dest.oldUserAskCouponOnceMore = true;
} else if (param.data.returnCode === 5) {
dest.vertifyWrong = true;
} else {
dest.ended = true;
}
if (param.data.newUser === 1) {
dest.newUser = true;
dest.newUser = true;
}
dest.message = param.data.returnMsg;
// 清空变量,释放内存
param = {};
return dest;
... ...
... ... @@ -32,7 +32,7 @@
<input id="phone" type="text" placeholder="请输入手机号" maxlength="11"/>
<i class="clear-input iconfont hidden clear-mobile">&#xe626;</i>
<div>取红包</div>
<div>取红包</div>
</div>
<div class="input-content vertify-input-content hidden">
... ...
... ... @@ -90,6 +90,19 @@ $('.input-content').on('click', '.verification-code', function() {
$('#dialog .content').html(' ');
}, 1400);
return;
} else if (data.result.oldUserAskCouponOnceMore) {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>');
setTimeout(function() {
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ');
$('.page .gain-coupon-centent').removeClass('hidden');
$('.page .coupon-centent').addClass('hidden');
$('#mobile').html('优惠券已发放至账户' + data.result.mobile);
}, 1400);
return;
}
} else {
$('#dialog').removeClass('hidden');
... ... @@ -148,7 +161,32 @@ $('.input-content').on('click', '.get', function() {
$('#dialog .content').html(' ');
}, 1400);
return;
} else if (data.result.vertifyWrong) {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">验证码错误,请重新输入。<p>');
setTimeout(function() {
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ');
}, 1400);
return;
} else if (data.result.oldUserAskCouponOnceMore) {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
$('#dialog .content').html('<p class="phone-error">您今天已经领过咯,速度去有货购潮流!<p>');
setTimeout(function() {
$('.messages').addClass('hidden');
$('.keep-out').addClass('hidden');
$('#dialog .content').html(' ');
$('.page .gain-coupon-centent').removeClass('hidden');
$('.page .coupon-centent').addClass('hidden');
$('#mobile').html('优惠券已发放至账户' + data.result.mobile);
}, 1400);
return;
}
// oldUserAskCouponOnceMore
} else {
$('#dialog').removeClass('hidden');
$('.keep-out').removeClass('hidden');
... ...