Showing
1 changed file
with
7 additions
and
10 deletions
@@ -71,8 +71,6 @@ function setIndexAction() { | @@ -71,8 +71,6 @@ function setIndexAction() { | ||
71 | var $loadingTip = $('.loading-tip'); | 71 | var $loadingTip = $('.loading-tip'); |
72 | var $avatarWrap = $('.avatar-wrap'); | 72 | var $avatarWrap = $('.avatar-wrap'); |
73 | 73 | ||
74 | - var move; | ||
75 | - | ||
76 | // 下拉刷新,上拉加载 | 74 | // 下拉刷新,上拉加载 |
77 | starIScroll = new PullRefresh('.star-wrap', { | 75 | starIScroll = new PullRefresh('.star-wrap', { |
78 | height: $(window).height() - commonHeaderTop, | 76 | height: $(window).height() - commonHeaderTop, |
@@ -109,7 +107,7 @@ function setIndexAction() { | @@ -109,7 +107,7 @@ function setIndexAction() { | ||
109 | slidesPerView: 'auto', | 107 | slidesPerView: 'auto', |
110 | loopedSlides: bannerLen, | 108 | loopedSlides: bannerLen, |
111 | spaceBetween: 10, | 109 | spaceBetween: 10, |
112 | - slidesOffsetBefore : -($('.swiper-num').width()), | 110 | + slidesOffsetBefore: -($('.swiper-num').width()), |
113 | watchSlidesProgress: true, | 111 | watchSlidesProgress: true, |
114 | watchSlidesVisibility: true | 112 | watchSlidesVisibility: true |
115 | }); | 113 | }); |
@@ -190,8 +188,8 @@ function setIndexAction() { | @@ -190,8 +188,8 @@ function setIndexAction() { | ||
190 | } | 188 | } |
191 | */ | 189 | */ |
192 | 190 | ||
193 | - $('.avatar').each(function(key, item){ | ||
194 | - $(item).addClass('avatar-' + key); | 191 | + $('.avatar').each(function(key, item) { |
192 | + $(item).addClass('avatar-' + key); | ||
195 | }); | 193 | }); |
196 | 194 | ||
197 | // banner swiper 初始化 | 195 | // banner swiper 初始化 |
@@ -212,15 +210,14 @@ function setIndexAction() { | @@ -212,15 +210,14 @@ function setIndexAction() { | ||
212 | if (bannerLen > 1) { | 210 | if (bannerLen > 1) { |
213 | avatarSwiper = new Swiper('.avatar-1', { | 211 | avatarSwiper = new Swiper('.avatar-1', { |
214 | loop: true, | 212 | loop: true, |
215 | - mode:'horizontal', | ||
216 | centeredSlides: true, | 213 | centeredSlides: true, |
217 | slidesPerView: 'auto', | 214 | slidesPerView: 'auto', |
218 | loopedSlides: bannerLen, | 215 | loopedSlides: bannerLen, |
219 | spaceBetween: 10, | 216 | spaceBetween: 10, |
220 | - slidesOffsetBefore : -($('.swiper-num').width()), | 217 | + slidesOffsetBefore: -($('.swiper-num').width()), |
221 | watchSlidesProgress: true, | 218 | watchSlidesProgress: true, |
222 | watchSlidesVisibility: true | 219 | watchSlidesVisibility: true |
223 | - }); | 220 | + }); |
224 | } | 221 | } |
225 | 222 | ||
226 | // 明星动态头像左右滑动 | 223 | // 明星动态头像左右滑动 |
@@ -250,7 +247,7 @@ function setIndexAction() { | @@ -250,7 +247,7 @@ function setIndexAction() { | ||
250 | } else { | 247 | } else { |
251 | avatarKey = $(this).index(); | 248 | avatarKey = $(this).index(); |
252 | 249 | ||
253 | - if(avatarSwiperClone) { | 250 | + if (avatarSwiperClone) { |
254 | avatarSwiperClone.slideTo(avatarKey, 1000, false); | 251 | avatarSwiperClone.slideTo(avatarKey, 1000, false); |
255 | } | 252 | } |
256 | 253 | ||
@@ -288,7 +285,7 @@ getIndexHtml = function() { | @@ -288,7 +285,7 @@ getIndexHtml = function() { | ||
288 | $('.avatar-clone').remove(); | 285 | $('.avatar-clone').remove(); |
289 | } | 286 | } |
290 | 287 | ||
291 | - $('.avatar li').each(function(){ | 288 | + $('.avatar li').each(function() { |
292 | setAvatar($(this).find('span')); | 289 | setAvatar($(this).find('span')); |
293 | }); | 290 | }); |
294 | 291 |
-
Please register or login to post a comment