function changeClass() { $(".slide-da .swiper-slide").removeClass("pr1 pr2 pr3 pr4 ne1 ne2 ne3 ne4"); $(".slide-da .swiper-slide-active").prev().addClass("pr1"); $(".slide-da .swiper-slide-active").next().addClass("ne1"); $(".slide-da .swiper-slide-active").prev().prev().addClass("pr2"); $(".slide-da .swiper-slide-active").next().next().addClass("ne2"); $(".slide-da .swiper-slide-active").prev().prev().prev().addClass("pr3"); $(".slide-da .swiper-slide-active").next().next().next().addClass("ne3"); } if (!isIE || ieVer == 10 || isIE11) { $(".leftline .line").append('') var gw = $(window).width(); var slide_ba = new Swiper('.slide-ba', { speed: 1000, spaceBetween: 0, loop: true, slidesPerView: 1, watchOverflow: true, effect : 'fade',fadeEffect: {crossFade: true}, autoplay: { delay:10000, stopOnLastSlide: false, disableOnInteraction: false, }, pagination: { el: ".bg1 .swiDotss", clickable: !0, bulletActiveClass: 'active',renderBullet: function (index, className) { return '';}}, navigation: { nextEl: '.slide-ba .next', prevEl: '.slide-ba .prev', }, on: { slideChangeTransitionStart : function(swiper){ if(gw>=1025){ var swiper = this; if($(".slide-ba .swiper-slide-active video").length>0){ //console.log(1) 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); } } }, slideChangeTransitionEnd: function(swiper){ setTimeout(function(){ $(".slide-ba .swiper-slide-active video").attr("id",""); }, 10); }, }, init: false }); // 移动端去掉视频 let home = $("#home"); if(home.length!=0){ if(gw<1200){ slide_ba.removeSlide(2); } } // 移动端去掉视频 var slide_apic = new Swiper('.slide-apic', { speed: 1000, grabCursor : true, //loop: true, slidesPerView: 1, // watchOverflow: true, // effect : 'fade',fadeEffect: {crossFade: true}, //autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, }, pagination: { el: ".homea .aleft .swiDots", clickable: !0, bulletActiveClass: 'active' }, navigation: { nextEl: '.homea .aleft .next', prevEl: '.homea .aleft .prev', }, }); var slide_atxt = new Swiper('.slide-atxt', { speed: 1000, grabCursor : true, // loop: true, spaceBetween: 20, slidesPerView: 1, // watchOverflow: true, // effect : 'fade',fadeEffect: {crossFade: true}, autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, }, pagination: { el: ".homea .aleft .swiDots", clickable: !0, bulletActiveClass: 'active' }, navigation: { nextEl: '.homea .aleft .next', prevEl: '.homea .aleft .prev', }, scrollbar: { el: '.homea .aleft .swiScroll', draggable: true, dragSize: 28, }, }); if($(".slide-apic").length!=0&&$(".slide-atxt").length!=0){ slide_apic.controller.control = slide_atxt; slide_atxt.controller.control = slide_apic; } var slide_d = new Swiper('.slide-d', { speed: 1000, spaceBetween: 20, slidesPerView: 1, grabCursor : true, roundLength:true, //loop:true, breakpoints: { 540: { slidesPerView: 2, spaceBetween: 20, }, 760: { slidesPerView: 2, spaceBetween: 21,}, 1025: { slidesPerView: 4, spaceBetween: 30,} }, // watchOverflow: true, // autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false, }, pagination: { el: ".homed .swiDots", clickable: !0, bulletActiveClass: 'active' }, navigation: { nextEl: '.homed .next', prevEl: '.homed .prev', }, scrollbar: { el: '.homed .swiScroll', draggable: true, dragSize: 25, }, }); setTimeout(function () { $('.loader').fadeOut(function(){ slide_ba.init(); var controller = new ScrollMagic.Controller(); var bannerH = $(".banner").height(); var homeaH = $(".homea").height(); var homebH = $(".homeb").height(); var homecH = $(".homec").height(); var homedH = $(".homed").height(); var homeeH = $(".footer").height(); var sceneba = new ScrollMagic.Scene({triggerElement: ".banner",offset:0,triggerHook: "onCenter",duration: bannerH}).setClassToggle(".banner", "_active").addTo(controller); var scenea = new ScrollMagic.Scene({triggerElement: ".homea",offset:-100,triggerHook: "onECenter",duration: homeaH}).setClassToggle(".homea", "_active").addTo(controller); var sceneb = new ScrollMagic.Scene({triggerElement: ".homeb",offset:-100,triggerHook: "onECenter",duration: homebH}).setClassToggle(".homeb", "_active").addTo(controller); var scenec = new ScrollMagic.Scene({triggerElement: ".homec",offset:-100,triggerHook: "onECenter",duration: homecH}).setClassToggle(".homec", "_active").addTo(controller); var scened = new ScrollMagic.Scene({triggerElement: ".homed",offset:-100,triggerHook: "onECenter",duration: homedH}).setClassToggle(".homed", "_active").addTo(controller); var scenee = new ScrollMagic.Scene({triggerElement: ".footer",offset:-100,triggerHook: "onECenter",duration: homeeH}).setClassToggle(".footer", "_active").addTo(controller); // sceneba.on("start",function () { // setTimeout(function(){$(".banner .leftline .tip").addClass('hide')},3000) // }); // sceneba.on('end',function(){ // $(".banner .leftline .tip").removeClass('hide') // }); // scenea.on("start",function () { // setTimeout(function(){$(".homea .leftline .tip").addClass('hide')},3000) // }); // scenea.on('end',function(){ // $(".homea .leftline .tip").removeClass('hide') // }); // sceneb.on("start",function () { // setTimeout(function(){$(".homeb .leftline .tip").addClass('hide')},3000) // }); // sceneb.on('end',function(){ // $(".homeb .leftline .tip").removeClass('hide') // }); // scenec.on("start",function () { // setTimeout(function(){$(".homec .leftline .tip").addClass('hide')},3000) // }); // scenec.on('end',function(){ // $(".homec .leftline .tip").removeClass('hide') // }); // scened.on("start",function () { // setTimeout(function(){$(".homed .leftline .tip").addClass('hide')},3000) // }); // scened.on('end',function(){ // $(".homed .leftline .tip").removeClass('hide') // }); // scenee.on("start",function () { // setTimeout(function(){$(".footer .leftline .tip").addClass('hide')},3000) // }); // scenee.on('end',function(){ // $(".footer .leftline .tip").removeClass('hide') // }); //05-27 sceneba.on("start",function () { $(".banner .leftline .tip").removeClass('hide') var res = $(".banner").hasClass("_active"); if(res){ setTimeout(function(){$(".banner .leftline .tip").addClass('hide')},2000) }else{ $(".banner .leftline .tip").removeClass('hide') } }); sceneba.on('end',function(){ $(".banner .leftline .tip").removeClass('hide') var res = $(".banner").hasClass("_active"); if(res){ setTimeout(function(){$(".banner .leftline .tip").addClass('hide')},2000) }else{ $(".banner .leftline .tip").removeClass('hide') } }); scenea.on("start",function () { $(".homea .leftline .tip").removeClass('hide') var res = $(".homea").hasClass("_active"); if(res){ setTimeout(function(){$(".homea .leftline .tip").addClass('hide')},2000) }else{ $(".homea .leftline .tip").removeClass('hide') } }); scenea.on("end",function () { $(".homea .leftline .tip").removeClass('hide') var res = $(".homea").hasClass("_active"); if(res){ setTimeout(function(){$(".homea .leftline .tip").addClass('hide')},2000) }else{ $(".homea .leftline .tip").removeClass('hide') } }); sceneb.on("start",function () { $(".homeb .leftline .tip").removeClass('hide') var res = $(".homeb").hasClass("_active"); if(res){ setTimeout(function(){$(".homeb .leftline .tip").addClass('hide')},2000) }else{ $(".homeb .leftline .tip").removeClass('hide') } }); sceneb.on("end",function () { $(".homeb .leftline .tip").removeClass('hide') var res = $(".homeb").hasClass("_active"); if(res){ setTimeout(function(){$(".homeb .leftline .tip").addClass('hide')},2000) }else{ $(".homeb .leftline .tip").removeClass('hide') } }); scenec.on("start",function () { $(".homec .leftline .tip").removeClass('hide') var res = $(".homec").hasClass("_active"); if(res){ setTimeout(function(){$(".homec .leftline .tip").addClass('hide')},2000) }else{ $(".homec .leftline .tip").removeClass('hide') } }); scenec.on("end",function () { $(".homec .leftline .tip").removeClass('hide') var res = $(".homec").hasClass("_active"); if(res){ setTimeout(function(){$(".homec .leftline .tip").addClass('hide')},2000) }else{ $(".homec .leftline .tip").removeClass('hide') } }); scened.on("start",function () { $(".homed .leftline .tip").removeClass('hide') var res = $(".homed").hasClass("_active"); if(res){ setTimeout(function(){$(".homed .leftline .tip").addClass('hide')},2000) }else{ $(".homed .leftline .tip").removeClass('hide') } }); scened.on("end",function () { $(".homed .leftline .tip").removeClass('hide') var res = $(".homed").hasClass("_active"); if(res){ setTimeout(function(){$(".homed .leftline .tip").addClass('hide')},2000) }else{ $(".homed .leftline .tip").removeClass('hide') } }); scenee.on("start",function () { $(".footer .leftline .tip").removeClass('hide') var res = $(".footer").hasClass("_active"); if(res){ setTimeout(function(){$(".footer .leftline .tip").addClass('hide')},2000) }else{ $(".footer .leftline .tip").removeClass('hide') } }); scenee.on("end",function () { $(".footer .leftline .tip").removeClass('hide') var res = $(".footer").hasClass("_active"); if(res){ setTimeout(function(){$(".footer .leftline .tip").addClass('hide')},2000) }else{ $(".footer .leftline .tip").removeClass('hide') } }); $(".leftline").hover(function() { $(this).find(".tip").removeClass('hide') }, function() { $(this).find(".tip").stop().addClass('hide') }); }); AOS.init({ duration: 1000, disable: 'mobile' //disable: true }); }, 1000) }