Authored by 张孝茹

lazyload

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