...
|
...
|
@@ -38,7 +38,7 @@ $('.goods-info').click(function() { |
|
|
}
|
|
|
});
|
|
|
|
|
|
if (bannerLen > 0) {
|
|
|
if (bannerLen > 0 && bannerLen < 3) {
|
|
|
new Swiper($avatarWrap.find('.avatar-swiper')[0], {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNextAmount: 3,
|
...
|
...
|
@@ -50,4 +50,17 @@ if (bannerLen > 0) { |
|
|
watchSlidesVisibility: true,
|
|
|
spaceBetween: 6
|
|
|
});
|
|
|
} else if (bannerLen >= 3) {
|
|
|
new Swiper($avatarWrap.find('.avatar-swiper')[0], {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNextAmount: 3,
|
|
|
initialSlide: 1,
|
|
|
centeredSlides: true,
|
|
|
slidesPerView: 'auto',
|
|
|
loopedSlides: bannerLen,
|
|
|
watchSlidesProgress: true,
|
|
|
watchSlidesVisibility: true,
|
|
|
spaceBetween: 6,
|
|
|
loop: true
|
|
|
});
|
|
|
} |
...
|
...
|
|