...
|
...
|
@@ -11,8 +11,9 @@ var $ = require('yoho-jquery'), |
|
|
PullRefresh = require('../plugin/pull-refresh');
|
|
|
|
|
|
var $window = $(window),
|
|
|
$starArticle = $('.star-article'),
|
|
|
$headTab = $('.head-tab'),
|
|
|
$starArticle = $('.star-article');
|
|
|
bannerLen = $('.avatar-swiper .swiper-slide').length;
|
|
|
|
|
|
/*
|
|
|
$swiperView = $('.swiper-view'),
|
...
|
...
|
@@ -40,10 +41,10 @@ $(function() { |
|
|
starIScroll = new PullRefresh('.star-wrap', {
|
|
|
height: $(window).height() - $('#yoho-header').height() - $('.head-tab').height(),
|
|
|
pullDown: function() {
|
|
|
console.log('下拉了');
|
|
|
location.reload();
|
|
|
},
|
|
|
pullUp: function() {
|
|
|
console.log('上滑了');
|
|
|
$headTab.slideUp();
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -155,7 +156,7 @@ function articleImgAction(dom, key) { |
|
|
*/
|
|
|
|
|
|
// banner swiper 初始化
|
|
|
if ($('.banner-swiper .swiper-slide').length > 1) {
|
|
|
if (bannerLen > 1) {
|
|
|
new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
...
|
...
|
@@ -173,10 +174,9 @@ if ($('.banner-swiper .swiper-slide').length > 1) { |
|
|
if ($('.avatar-swiper .swiper-slide').length > 1) {
|
|
|
avatarSwiper = new Swiper('.avatar-swiper', {
|
|
|
loop: true,
|
|
|
loopedSlides: bannerLen,
|
|
|
initialSlide: 3,
|
|
|
centeredSlides: true,
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
slidesPerView: 'auto',
|
|
|
slidesOffsetBefore: '-' + $('.avatar-swiper').find('li').not('.swiper-slide-visible').width() / 2,
|
|
|
watchSlidesProgress: true,
|
...
|
...
|
|