Authored by lijing

已售罄按钮显示异常

@@ -77,6 +77,7 @@ $( @@ -77,6 +77,7 @@ $(
77 success: function(data) { 77 success: function(data) {
78 // 秒杀是否结束 78 // 秒杀是否结束
79 if (data.status !== 1 && data.status !== 2) { 79 if (data.status !== 1 && data.status !== 2) {
  80 + $('.sold-out').hide();
80 $('.cart-bar a:first').append('<a href="javascript:;" class="sold-out">已售罄</a>'); 81 $('.cart-bar a:first').append('<a href="javascript:;" class="sold-out">已售罄</a>');
81 $('.addto-cart').hide(); 82 $('.addto-cart').hide();
82 $('.cart-bar').show(); 83 $('.cart-bar').show();
@@ -101,6 +102,7 @@ $( @@ -101,6 +102,7 @@ $(
101 '<span class="seckill-time-c">月日</span>' + 102 '<span class="seckill-time-c">月日</span>' +
102 '</div>' 103 '</div>'
103 ); 104 );
  105 + $('.sold-out').hide();
104 $('.cart-bar a:first').after('<a href="javascript:;" class="sold-out">即将开抢</a>'); 106 $('.cart-bar a:first').after('<a href="javascript:;" class="sold-out">即将开抢</a>');
105 $('.addto-cart').hide(); 107 $('.addto-cart').hide();
106 $('.cart-bar').show(); 108 $('.cart-bar').show();
@@ -177,6 +179,7 @@ $( @@ -177,6 +179,7 @@ $(
177 seckillNum = seckillNum + data.secKillSku[i].storageNum; 179 seckillNum = seckillNum + data.secKillSku[i].storageNum;
178 } 180 }
179 if (seckillNum === 0) { 181 if (seckillNum === 0) {
  182 + $('.sold-out').hide();
180 $('.cart-bar a:first').append('<a href="javascript:;" class="sold-out">已售罄</a>'); 183 $('.cart-bar a:first').append('<a href="javascript:;" class="sold-out">已售罄</a>');
181 $('.addto-cart').hide(); 184 $('.addto-cart').hide();
182 } 185 }