Authored by tmq

添加js

... ... @@ -247,6 +247,63 @@ define('channel', function(require, exports) {
cooperateNext,
swiperLen,
changeCooperationClass;
var cooperateSwiper,
bannerSwipe;
//大banner滑动
if ($('.slide-main').find('.box').size() > 1) {
bannerSwipe = swipe.init({
slideBox: '.slide-box',
prev: '.slide-prev',
next: '.slide-next',
auto: 3000,
continuous: true,
callback: function(index) {
if (index >= $('.dib a').size()) {
index = index - $('.dib a').size();
}
$('.dib a').removeClass('on').eq(index).addClass('on');
}
});
}
$('.dib').on('click', 'a', function() {
bannerSwipe.slide($(this).index());
})
if ($('.slide-box').find('.box').size() <= 1) {
$('.slide-navigator').hide();
$('.slide-control').hide();
}
$('.cooperation-slide-prev').addClass('disable');
cooperateSwiper = new swiper('.cooperation-slide-box', {
wrapperClass: 'slide-wrap',
slideClass: 'box',
slidesPerView: 'auto',
onSlideChangeStart: function() {
var swiperLen = $('.cooperation-slide-box').find('.box').size();
$('.cooperation-slide-prev,.cooperation-slide-next').removeClass('disable');
if (cooperateSwiper.activeIndex === swiperLen - 1) {
$('.cooperation-slide-next').addClass('disable');
} else if (cooperateSwiper.activeIndex === 0) {
$('.cooperation-slide-prev').addClass('disable');
}
}
});
$('.cooperation-slide-prev').on('click', function(e) {
e.preventDefault();
cooperateSwiper.swipePrev();
});
$('.cooperation-slide-next').on('click', function(e) {
e.preventDefault();
cooperateSwiper.swipeNext();
});
if (parseInt($("#right_banner").attr("num")) > 0) {
$("#img_flow").find(".layout-item").eq(2).before($("#right_banner").html());
}
setFlowLayout();
/**
* 将 资讯页面的 固定 banner 位插入资讯右侧
... ...