Authored by lijing

合5.5.1swiper增加判断

@@ -23,13 +23,15 @@ if ($('.recommend-for-you').length) { @@ -23,13 +23,15 @@ if ($('.recommend-for-you').length) {
23 require('common/suspend-cart'); 23 require('common/suspend-cart');
24 require('common/footer'); 24 require('common/footer');
25 25
26 -new Swiper('.banner-center-swiper', { 26 +if ($('.banner-center-swiper').length > 0) {
  27 + new Swiper('.banner-center-swiper', {
27 pagination: '.swiper-pagination', 28 pagination: '.swiper-pagination',
28 lazyLoading: true, 29 lazyLoading: true,
29 lazyLoadingInPrevNext: true, 30 lazyLoadingInPrevNext: true,
30 paginationClickable: true, 31 paginationClickable: true,
31 autoplay: 3000 32 autoplay: 3000
32 -}); 33 + });
  34 +}
33 35
34 window.reMarginFooter('.footer-tab'); 36 window.reMarginFooter('.footer-tab');
35 37