Authored by zhangxiaoru

购物车失效商品

@@ -242,3 +242,7 @@ $cartNav.on('touchstart', 'li', function(e) { @@ -242,3 +242,7 @@ $cartNav.on('touchstart', 'li', function(e) {
242 242
243 //提前触发lazyload 243 //提前触发lazyload
244 $(window).scrollTop(1).scrollTop(0); 244 $(window).scrollTop(1).scrollTop(0);
  245 +
  246 +if ($('.invalid-goods').find('.shopping-cart-good').length === 0) {
  247 + $('#failure-goods').removeClass('invalid-goods');
  248 +}
@@ -4,21 +4,19 @@ @@ -4,21 +4,19 @@
4 {{/ goods}} 4 {{/ goods}}
5 </div> 5 </div>
6 6
7 -{{#if notValidGoods}}  
8 - <div class="invalid-goods"> 7 +<div class="invalid-goods" id="failure-goods">
  8 + {{#if notValidGoods}}
9 {{# notValidGoods}} 9 {{# notValidGoods}}
10 - {{> cart/good}} 10 + {{> cart/good}}
11 {{/ notValidGoods}} 11 {{/ notValidGoods}}
12 - </div>  
13 -{{/if}} 12 + {{/if}}
14 13
15 -{{#if offShelveGoods}}  
16 - <div class="invalid-goods off-shell-goods"> 14 + {{#if offShelveGoods}}
17 {{# offShelveGoods}} 15 {{# offShelveGoods}}
18 - {{> cart/good}} 16 + {{> cart/good}}
19 {{/ offShelveGoods}} 17 {{/ offShelveGoods}}
20 - </div>  
21 -{{/if}} 18 + {{/if}}
  19 +</div>
22 20
23 {{#if freebieOrAdvanceBuy}} 21 {{#if freebieOrAdvanceBuy}}
24 <ul class="freebie-and-advance-buy"> 22 <ul class="freebie-and-advance-buy">