Authored by 张孝茹

文案修改 滑动效果修改

1 <div class="friend-invite-page yoho-page"> 1 <div class="friend-invite-page yoho-page">
2 {{# friendInviteData}} 2 {{# friendInviteData}}
3 <div class="banner"> 3 <div class="banner">
4 - <span class="title">您的好友{{nickname}}<br><b>{{#if payText}}发现了好物并完成下单{{else}}邀请您来有货玩潮流{{/if}}</b></span> 4 + <span class="title">您的好友{{nickname}}<br><b>{{#if payText}}在有货发现了好物并推荐给您{{else}}邀请您来有货玩潮流{{/if}}</b></span>
5 <span class="ico-left"></span> 5 <span class="ico-left"></span>
6 <span class="ico-right"></span> 6 <span class="ico-right"></span>
7 {{#if friendsGoods}} 7 {{#if friendsGoods}}
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 {{# friendsGoods}} 11 {{# friendsGoods}}
12 <li class="order-good swiper-slide"> 12 <li class="order-good swiper-slide">
13 <a href="{{goodUrl}}"> 13 <a href="{{goodUrl}}">
14 - <img class="" src="{{image imgSrc 240 320}}"> 14 + <img src="{{image imgSrc 240 320}}">
15 </a> 15 </a>
16 <li> 16 <li>
17 {{/ friendsGoods}} 17 {{/ friendsGoods}}
@@ -38,7 +38,7 @@ $('.goods-info').click(function() { @@ -38,7 +38,7 @@ $('.goods-info').click(function() {
38 } 38 }
39 }); 39 });
40 40
41 -if (bannerLen > 0) { 41 +if (bannerLen > 0 && bannerLen < 3) {
42 new Swiper($avatarWrap.find('.avatar-swiper')[0], { 42 new Swiper($avatarWrap.find('.avatar-swiper')[0], {
43 lazyLoading: true, 43 lazyLoading: true,
44 lazyLoadingInPrevNextAmount: 3, 44 lazyLoadingInPrevNextAmount: 3,
@@ -50,4 +50,17 @@ if (bannerLen > 0) { @@ -50,4 +50,17 @@ if (bannerLen > 0) {
50 watchSlidesVisibility: true, 50 watchSlidesVisibility: true,
51 spaceBetween: 6 51 spaceBetween: 6
52 }); 52 });
  53 +} else if (bannerLen >= 3) {
  54 + new Swiper($avatarWrap.find('.avatar-swiper')[0], {
  55 + lazyLoading: true,
  56 + lazyLoadingInPrevNextAmount: 3,
  57 + initialSlide: 1,
  58 + centeredSlides: true,
  59 + slidesPerView: 'auto',
  60 + loopedSlides: bannerLen,
  61 + watchSlidesProgress: true,
  62 + watchSlidesVisibility: true,
  63 + spaceBetween: 6,
  64 + loop: true
  65 + });
53 } 66 }