Authored by ccbikai

新品到着swiper 单张图片不进行初始化

... ... @@ -17,10 +17,13 @@ var winH = $(window).height(),
var swiper;
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
// slide 个数大于 1 事,使用 swiper ,否则只显示单张图片
if ($('.swiper-container').length > 1) {
swiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
}
lazyLoad($('img.lazy'));
$curNav = $navList.children('.focus');
... ...