...
|
...
|
@@ -11,7 +11,9 @@ var $ = require('yoho-jquery'), |
|
|
PullRefresh = require('../plugin/pull-refresh');
|
|
|
|
|
|
var $window = $(window),
|
|
|
$starArticle = $('.star-article');
|
|
|
$starArticle = $('.star-article'),
|
|
|
$headTab = $('.head-tab'),
|
|
|
bannerLen = $('.avatar-swiper .swiper-slide').length;
|
|
|
|
|
|
/*
|
|
|
$swiperView = $('.swiper-view'),
|
...
|
...
|
@@ -39,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();
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -134,7 +136,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,
|
...
|
...
|
@@ -152,10 +154,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,
|
...
|
...
|
|