Authored by 王水玲

秒杀修改

@@ -724,15 +724,16 @@ function setSeckillProductData(curProdcutList, products) { @@ -724,15 +724,16 @@ function setSeckillProductData(curProdcutList, products) {
724 function viewSeckillProduct(products, dom) { 724 function viewSeckillProduct(products, dom) {
725 let $productList = $('.seckill .product-list'); 725 let $productList = $('.seckill .product-list');
726 let num = $productList.data('num'); 726 let num = $productList.data('num');
  727 + let $curOutProductList = dom ? dom.parents('.seckill').find('.out-product-list') : $('.out-product-list');
727 728
728 if (products && products.length > num) { 729 if (products && products.length > num) {
729 products = products.slice(0, num); 730 products = products.slice(0, num);
730 } 731 }
731 732
732 if (products.length <= 3) { 733 if (products.length <= 3) {
733 - $('.out-product-list').addClass('less-than-3'); 734 + $curOutProductList.addClass('less-than-3');
734 } else { 735 } else {
735 - $('.out-product-list').removeClass('less-than-3'); 736 + $curOutProductList.removeClass('less-than-3');
736 } 737 }
737 738
738 if (dom) { 739 if (dom) {