Authored by 张孝茹

lazyload

@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 {{# hotGoods}} 31 {{# hotGoods}}
32 <a class="goods-info" href="{{url}}" data-good-id="{{product_id}}"> 32 <a class="goods-info" href="{{url}}" data-good-id="{{product_id}}">
33 <div class="goods-image"> 33 <div class="goods-image">
34 - <img src="{{image default_images 318 425}}"> 34 + <img class="lazy" data-original="{{image default_images 318 425}}">
35 </div> 35 </div>
36 <div class="good-detail-text"> 36 <div class="good-detail-text">
37 <div class="price"> 37 <div class="price">
@@ -4,6 +4,9 @@ let PRDID = []; @@ -4,6 +4,9 @@ let PRDID = [];
4 let Swiper = require('yoho-swiper'); 4 let Swiper = require('yoho-swiper');
5 let $avatarWrap = $('.avatar-wrap'); 5 let $avatarWrap = $('.avatar-wrap');
6 let bannerLen = $('.avatar-wrap').find('.swiper-slide').length; 6 let bannerLen = $('.avatar-wrap').find('.swiper-slide').length;
  7 +let lazyLoad = require('plugin/lazyload-v2');
  8 +
  9 +lazyLoad('img[class=lazy]');
7 10
8 $('.good-list').find('.goods-info').each(function() { 11 $('.good-list').find('.goods-info').each(function() {
9 PRDID.push($(this).data('good-id')); 12 PRDID.push($(this).data('good-id'));