...
|
...
|
@@ -464,7 +464,11 @@ $identityWrap.delegate('.backForm', 'click', function() { |
|
|
$identityForm.removeClass('hide').siblings().addClass('hide');
|
|
|
});
|
|
|
|
|
|
$('.enable .normal').on('click', function(e) {
|
|
|
$('.enable .info').on('click', function(e) {
|
|
|
if ($(this).children('.normal').length !== 1) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
e.preventDefault();
|
|
|
requestCoupon($(this).closest('a').data('id'));
|
|
|
redirect.gunangSrc = $(this).closest('a').get(0).href;
|
...
|
...
|
@@ -580,10 +584,13 @@ $(function() { |
|
|
success: function(res) {
|
|
|
var code = res.code,
|
|
|
i,
|
|
|
text;
|
|
|
text,
|
|
|
$a;
|
|
|
|
|
|
if (code === 200) {
|
|
|
for (i = 0; i < res.data.length; i++) {
|
|
|
$a = $('[data-id=\'' + res.data[i].couponId + '\']');
|
|
|
|
|
|
text = '';
|
|
|
|
|
|
if (res.data[i].status === 1) {
|
...
|
...
|
@@ -593,24 +600,28 @@ $(function() { |
|
|
'</div>';
|
|
|
}
|
|
|
if (res.data[i].status === 2) {
|
|
|
$a.removeClass('enable');
|
|
|
text = '<div class="empty">' +
|
|
|
'<p>已抢光</p>' +
|
|
|
'<p class="guang">去逛逛</p>' +
|
|
|
'</div>';
|
|
|
}
|
|
|
if (res.data[i].status === 3) {
|
|
|
$a.removeClass('enable');
|
|
|
text = '<div class="got">' +
|
|
|
'<p>已领取</p>' +
|
|
|
'<p class="guang">去使用</p>' +
|
|
|
'</div>';
|
|
|
}
|
|
|
if (res.data[i].status === 4) {
|
|
|
$a.removeClass('enable');
|
|
|
text = '<div class="normal">' +
|
|
|
'<p>已过期</p>' +
|
|
|
'<p class="guang">去逛逛</p>' +
|
|
|
'</div>';
|
|
|
}
|
|
|
$('[data-id=\'' + res.data[i].couponId + '\']').find('.info').html(text);
|
|
|
|
|
|
$a.find('.info').html(text);
|
|
|
}
|
|
|
|
|
|
}
|
...
|
...
|
|