$(function(){
$(".homed .hd ul li .dots").html('')
if (!isIE || ieVer == 10 || isIE11) {
var gw = $(window).width();
var videoTime = 5000;
var slide_ba = new Swiper('.slide-ba', {
speed: 1000,
spaceBetween: 0,
loop: true,
slidesPerView: 1,
watchOverflow: true,
lazy: {loadPrevNext: true},
//effect : 'fade',fadeEffect: {crossFade: true},
autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, },
pagination: { el: ".slide-ba .swiDots", clickable: !0, bulletActiveClass: 'active',renderBullet: function (index, className) {
return '';
}},
navigation: { nextEl: '.slide-ba .next', prevEl: '.slide-ba .prev', },
on: {
transitionStart: function() {
$(".ba_cur").text('0'+(this.realIndex+1))
//console.log(this.realIndex)
if(this.realIndex==0){
delay = videoTime
}else{
delay = this.params.autoplay.delay
};
anime({
targets: '.slide-ba .swiDots .active .path-loop',
delay: 0,
strokeDashoffset: function (el) {
var svgLength = anime.setDashoffset(el);
return [svgLength, 0];
},
easing: "linear",
duration: delay
});
},
transitionEnd: function() {
//anime({targets: '.cls-loop',delay:0,strokeDashoffset: function(el) {var svgLength = anime.setDashoffset(el);return [svgLength, 0];},easing: 'linear',duration: delay,});
},
slideChangeTransitionStart : function(swiper){
if(gw>=1025){
var swiper = this;
if($(".slide-ba .swiper-slide-active video").length>0){
// console.log(1)
//$(".banner .linsvg").css('opacity','0');
swiper.autoplay.stop();
setTimeout(function(){
swiper.autoplay.stop();
$(".slide-ba .swiper-slide-active video").attr("id","video_01");
var _video=document.getElementById("video_01");
_video.play();
_video.currentTime = 0;
_video.volume = 0;
_video.addEventListener('ended', function () {
swiper.slideNext();
swiper.autoplay.start();
});
}, 10);
}else{
//$(".banner .linsvg").css('opacity','1');
}
}
},
slideChangeTransitionEnd: function(swiper){
setTimeout(function(){
// $(".banner .linsvg").show();
$(".slide-ba .swiper-slide-active video").attr("id","");
}, 10);
},
},
//init: false
});
// 移动端去掉视频
var home = $("#slide-video");
if(home.length!=0){
if(gw<1200){
slide_ba.removeSlide(0);
}
}
// 移动端去掉视频
anime({
targets: '.slide-ba .swiDots .active .path-loop',
delay: 0,
strokeDashoffset: function (el) {
var svgLength = anime.setDashoffset(el);
return [svgLength, 0];
},
easing: "linear",
duration: videoTime
});
var slide_teacher = new Swiper('.slide-teacher', {
speed: 1000,
//loop:true,
spaceBetween:0 ,
slidesPerView:2 ,
watchOverflow: true,
breakpoints: {
350: { slidesPerView: 2, },
560: { slidesPerView: 3,},
760: { slidesPerView:3,},
1100: { slidesPerView:4}
},
autoplay: { delay: 8000, stopOnLastSlide: false, disableOnInteraction: false, },
pagination: { el: ".homee .swiDots", clickable: !0, bulletActiveClass: 'active' },
navigation: { nextEl: '.homee .next', prevEl: '.homee .prev', },
scrollbar: {
el: '.homee .swiScroll',
draggable: true,
},
});
var slide_links = new Swiper('.slide-links', {
speed: 1000,
slidesPerView:3 ,
watchOverflow: true,
breakpoints: {
350: { slidesPerView: 3, },
560: { slidesPerView: 4,},
760: { slidesPerView:5,},
1100: { slidesPerView:7}
},
//autoplay: { delay: 8000, stopOnLastSlide: false, disableOnInteraction: false, },
pagination: { el: ".slide-links .swiDots", clickable: !0, bulletActiveClass: 'active' },
// navigation: { nextEl: '.slide-d-ap .next', prevEl: '.slide-d-ap .prev', },
});
var slide_litpic = new Swiper('.slide-litpic', {
speed: 1000,
spaceBetween: 20,
lazy: {loadPrevNext: true},
autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, },
//effect : 'fade',fadeEffect: {crossFade: true},
on:{
init: function(swiper){
$(".homef .left__f .items2 .list ul li").eq(0).addClass('on')
},
transitionStart: function(){
$(".homef .left__f .items2 .list ul li").eq(this.realIndex).addClass('on').siblings().removeClass('on').find('p').stop().slideUp();;
$(".homef .left__f .items2 .list ul li").eq(this.realIndex).find('p').stop().slideDown();
}
}
});
$(".homef .left__f .items2 .list ul li").hover(function(e){
e.preventDefault()
$(this).addClass('on').siblings().removeClass('on');
slide_litpic.slideTo( $(this).index() )
})
}
$('.loader').delay(1000).fadeOut(function(){
});
if (!isIE) {
AOS.init({
duration: 1000,
disable: 'mobile',
// once: true,
//disable: true
});
}else{
AOS.init({
duration: 1000,
disable: true
});
}
// if(!Sys.safari){
// alert("11")
// }
})
$(window).on('load',function() {
});