Authored by 王水玲

星潮bug修改

1 <div class="star-page yoho-page"> 1 <div class="star-page yoho-page">
2 {{> star/head-tab}} 2 {{> star/head-tab}}
3 - <div class="swiper-num"></div> 3 + <div class="swiper-num swiper-num1"></div>
  4 + <div class="swiper-num swiper-num2"></div>
  5 + <div class="swiper-num swiper-num3"></div>
4 <div class="star-main"> 6 <div class="star-main">
5 {{> star/index-html}} 7 {{> star/index-html}}
6 </div> 8 </div>
@@ -28,6 +28,9 @@ var mySwiper; @@ -28,6 +28,9 @@ var mySwiper;
28 28
29 var avatarKey, bannerLen, res, avatarSwiper, avatarSwiperClone, getIndexHtml, $avatarClone, $avatar, $starArticle; 29 var avatarKey, bannerLen, res, avatarSwiper, avatarSwiperClone, getIndexHtml, $avatarClone, $avatar, $starArticle;
30 30
  31 +var swiperNum = ($('.swiper-num2').width() - $('.swiper-num1').width()) +
  32 + ($('.swiper-num3').width() - $('.swiper-num1').width()) / 2;
  33 +
31 require('../common'); 34 require('../common');
32 35
33 lazyLoad($('img.lazy')); 36 lazyLoad($('img.lazy'));
@@ -126,7 +129,7 @@ function setIndexAction() { @@ -126,7 +129,7 @@ function setIndexAction() {
126 slidesPerView: 'auto', 129 slidesPerView: 'auto',
127 loopedSlides: bannerLen, 130 loopedSlides: bannerLen,
128 spaceBetween: 10, 131 spaceBetween: 10,
129 - slidesOffsetBefore: -($('.swiper-num').width()), 132 + slidesOffsetBefore: -swiperNum,
130 watchSlidesProgress: true, 133 watchSlidesProgress: true,
131 watchSlidesVisibility: true, 134 watchSlidesVisibility: true,
132 onInit: function() { 135 onInit: function() {
@@ -163,7 +166,7 @@ function setIndexAction() { @@ -163,7 +166,7 @@ function setIndexAction() {
163 slidesPerView: 'auto', 166 slidesPerView: 'auto',
164 loopedSlides: bannerLen, 167 loopedSlides: bannerLen,
165 spaceBetween: 10, 168 spaceBetween: 10,
166 - slidesOffsetBefore: -($('.swiper-num').width()), 169 + slidesOffsetBefore: -swiperNum,
167 watchSlidesProgress: true, 170 watchSlidesProgress: true,
168 watchSlidesVisibility: true, 171 watchSlidesVisibility: true,
169 onInit: function() { 172 onInit: function() {
@@ -412,11 +412,22 @@ @@ -412,11 +412,22 @@
412 } 412 }
413 413
414 .swiper-num { 414 .swiper-num {
415 - width: 55px;  
416 position: fixed; 415 position: fixed;
417 top: 0; 416 top: 0;
418 z-index: -1; 417 z-index: -1;
419 } 418 }
  419 +
  420 + .swiper-num1 {
  421 + width: 110px;
  422 + }
  423 +
  424 + .swiper-num2 {
  425 + width: 130px;
  426 + }
  427 +
  428 + .swiper-num3 {
  429 + width: 180px;
  430 + }
420 } 431 }
421 432
422 .star-index-bg { 433 .star-index-bg {