|
@@ -564,10 +564,10 @@ $('.ident-select-wrap').one('click', function() { |
|
@@ -564,10 +564,10 @@ $('.ident-select-wrap').one('click', function() { |
564
|
*埋点
|
564
|
*埋点
|
565
|
*/
|
565
|
*/
|
566
|
$(function() {
|
566
|
$(function() {
|
567
|
- //加载优惠券状态
|
567
|
+ // 加载优惠券状态
|
568
|
var couponIds = '';
|
568
|
var couponIds = '';
|
569
|
|
569
|
|
570
|
- $('.coupon > a').each(function(){
|
570
|
+ $('.coupon > a').each(function() {
|
571
|
couponIds += $(this).attr('data-id') + ',';
|
571
|
couponIds += $(this).attr('data-id') + ',';
|
572
|
});
|
572
|
});
|
573
|
|
573
|
|
|
@@ -575,43 +575,45 @@ $(function() { |
|
@@ -575,43 +575,45 @@ $(function() { |
575
|
type: 'GET',
|
575
|
type: 'GET',
|
576
|
url: '/product/students/userAcquireStatus',
|
576
|
url: '/product/students/userAcquireStatus',
|
577
|
data: {
|
577
|
data: {
|
578
|
- couponIds: couponIds.substring(0,couponIds.length-1)
|
578
|
+ couponIds: couponIds.substring(0, couponIds.length - 1)
|
579
|
},
|
579
|
},
|
580
|
success: function(res) {
|
580
|
success: function(res) {
|
581
|
- var code = res.code;
|
581
|
+ var code = res.code,
|
|
|
582
|
+ i,
|
|
|
583
|
+ text;
|
582
|
|
584
|
|
583
|
console.info(res);
|
585
|
console.info(res);
|
584
|
- if (code == 200) {
|
|
|
585
|
- for (var i = 0; i < res.data.length; i++) {
|
|
|
586
|
- var text = '';
|
586
|
+ if (code === 200) {
|
|
|
587
|
+ for (i = 0; i < res.data.length; i++) {
|
|
|
588
|
+ text = '';
|
587
|
|
589
|
|
588
|
if (res.data[i].status === 1) {
|
590
|
if (res.data[i].status === 1) {
|
589
|
- text = '<div class="normal">' +
|
591
|
+ text = '<div class="normal">' +
|
590
|
'<p>点击</p>' +
|
592
|
'<p>点击</p>' +
|
591
|
'<p>领取</p>' +
|
593
|
'<p>领取</p>' +
|
592
|
'</div>';
|
594
|
'</div>';
|
593
|
}
|
595
|
}
|
594
|
if (res.data[i].status === 2) {
|
596
|
if (res.data[i].status === 2) {
|
595
|
- text = '<div class="empty">' +
|
597
|
+ text = '<div class="empty">' +
|
596
|
'<p>已抢光</p>' +
|
598
|
'<p>已抢光</p>' +
|
597
|
'<p class="guang">去逛逛</p>' +
|
599
|
'<p class="guang">去逛逛</p>' +
|
598
|
'</div>';
|
600
|
'</div>';
|
599
|
}
|
601
|
}
|
600
|
if (res.data[i].status === 3) {
|
602
|
if (res.data[i].status === 3) {
|
601
|
- text = '<div class="got">' +
|
603
|
+ text = '<div class="got">' +
|
602
|
'<p>已领取</p>' +
|
604
|
'<p>已领取</p>' +
|
603
|
'<p class="guang">去使用</p>' +
|
605
|
'<p class="guang">去使用</p>' +
|
604
|
'</div>';
|
606
|
'</div>';
|
605
|
}
|
607
|
}
|
606
|
if (res.data[i].status === 4) {
|
608
|
if (res.data[i].status === 4) {
|
607
|
- text = '<div class="normal">' +
|
609
|
+ text = '<div class="normal">' +
|
608
|
'<p>已过期</p>' +
|
610
|
'<p>已过期</p>' +
|
609
|
'<p class="guang">去逛逛</p>' +
|
611
|
'<p class="guang">去逛逛</p>' +
|
610
|
'</div>';
|
612
|
'</div>';
|
611
|
}
|
613
|
}
|
612
|
- $("[data-id='" + res.data[i].couponId + "']").find('.info').html(text);
|
614
|
+ $('[data-id=\'' + res.data[i].couponId + '\']').find('.info').html(text);
|
613
|
}
|
615
|
}
|
614
|
-
|
616
|
+
|
615
|
}
|
617
|
}
|
616
|
},
|
618
|
},
|
617
|
error: function() {
|
619
|
error: function() {
|