// banner var swiper = new Swiper(".main-visual-slider .swiper-container", { loop: true, speed: 1200, draggable: false, autoplay: { delay: 6000, disableOnInteraction: false }, // allowTouchMove: true, // watchSlidesProgress: true, pagination: { el: '.swiper-pagination', clickable: true, type: 'fraction', renderFraction: function (currentClass, totalClass) { return '' + ' / ' + ''; }, }, navigation: { nextEl: '.banner .swiper-button-next', prevEl: '.banner .swiper-button-prev', }, on: { slideChangeTransitionStart : function(swiper){ var swiper = this; if ($(window).width() > 1200) { // 判断swiper-slide-active是否有视频 if($(".main-visual-slider .swiper-slide-active video").length>0){ console.log(1) // 停止自动切换 swiper.autoplay.stop(); // 动态增加id setTimeout(function(){ swiper.autoplay.stop(); $(".main-visual-slider .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(); //重新开始轮播banner swiper.autoplay.start(); }); }, 10); } } }, slideChangeTransitionEnd: function(swiper){ //动态移除id setTimeout(function(){ $(".main-visual-slider .swiper-slide-active video").attr("id",""); }, 10); }, } }); if ($(window).width() < 1200) { $(".swiper-box1 video").remove(); }; // $(function () { // //切换轮播1 // $(".home2 .title h3").click(function (e) { // e.preventDefault() // $(this).addClass('on').siblings().removeClass('on') // var i = $(this).index(); // $(".home2 .title .a").eq(i).addClass('on').siblings().removeClass('on'); // // $(".home2 .tab1").eq(i).slideDown().siblings().slideUp(); // tab1.slideTo($(this).index()) // }); // var tab1 = new Swiper('.home2-t>.swiper-container', { // noSwiping: true, // speed: 800, // slidesPerView: 1, // effect: "fade", // fadeEffect: { // crossFade: true, // }, // on: { // slideChangeTransitionStart: function () { // $(".home2 .title h3").eq(this.realIndex).addClass('on').siblings().removeClass('on'); // $(".home2 .title .a").eq(this.realIndex).addClass('on').siblings().removeClass('on'); // } // } // }); // }); var swiper1 = new Swiper('.home1-t .left .swiper-container', { speed: 1000, loop: true, // slidesToShow: 1, autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false, }, // 如果需要前进后退按钮 pagination: { el: '.swiper-pagination', clickable: true, }, navigation: { nextEl: '.home1-t .left .swiper-button-next', prevEl: '.home1-t .left .swiper-button-prev', }, }) $('.h1-s').slick({ slidesToShow: 1, slidesToScroll: 1, arrows: false, autoplay:true, dots:true, }); var swiper2 = new Swiper('.home2-t .swiper-container', { speed: 1000, loop: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false, }, scrollbar: { el: '.home2-t .swiper-scrollbar', }, // navigation: { // nextEl: '.swiper-button-next', // prevEl: '.swiper-button-prev', // }, breakpoints: { 320: { slidesPerView: 1, spaceBetween: 0, }, 500: { slidesPerView: 2, spaceBetween: 15, }, 768: { slidesPerView: 3, spaceBetween: 20, }, 1024: { slidesPerView: 3, spaceBetween: 40, } } }) var swiper3 = new Swiper('.home3-t .swiper-container', { speed: 1000, loop: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: '.home3-t .swiper-button-next', prevEl: '.home3-t .swiper-button-prev', }, // navigation: { // nextEl: '.swiper-button-next', // prevEl: '.swiper-button-prev', // }, breakpoints: { 320: { slidesPerView: 2, spaceBetween: 20, centeredSlides: false, }, 500: { slidesPerView: 2, centeredSlides: false, spaceBetween: 20, }, 768: { slidesPerView: 3, centeredSlides: true, spaceBetween: 20, }, 1024: { slidesPerView: 4, centeredSlides: true, spaceBetween: 40, } } }) var swiper4 = new Swiper('.home4-t .swiper-container', { speed: 1000, // loop: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: '.home4-t .swiper-button-next', prevEl: '.home4-t .swiper-button-prev', }, pagination: { el: '.home4-t .swiper-pagination', clickable: true, }, breakpoints: { 320: { slidesPerView: 2, spaceBetween: 20, }, 500: { slidesPerView: 3, spaceBetween: 20, }, 768: { slidesPerView: 4, spaceBetween: 10, }, 1024: { slidesPerView: 5, spaceBetween: 30, } } }) var swiper5 = new Swiper('.home7-t .swiper-container', { speed: 1000, loop: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false, }, navigation: { nextEl: '.home7-t .swiper-button-next', prevEl: '.home7-t .swiper-button-prev', }, // pagination: { // el: '.home4-t .swiper-pagination', // clickable: true, // }, breakpoints: { 320: { slidesPerView: 2, spaceBetween: 20, }, 500: { slidesPerView: 3, spaceBetween: 20, }, 768: { slidesPerView: 4, spaceBetween: 20, }, 1024: { slidesPerView: 4, spaceBetween: 40, } } }) $('.sz').countUp({ delay: 10,//每个数字动画的延迟时间,单位毫秒。 time: 1000//计数动画总的持续时间。 }); // slideW = 320;//一张图300px, 每面四张角度22.5(PI/8),中心角度PI/16 // radius = slideW*0.5/Math.sin(Math.PI/16);//半径。圆心并不是视点中心,视点在1200px eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('a d(){$(".0-5 .2-0").b("6 7 8 c");$(".0-5 .2-0-3").1().4("6");$(".0-5 .2-0-3").1().1().4("7");$(".0-5 .2-0-3").1().1().1().4("8");$(".0-5 .2-0-3").1().1().1().1().4("c")}a e(){$(".0-9 .2-0").b("6 7 8 ");$(".0-9 .2-0-3").1().4("6");$(".0-9 .2-0-3").1().1().4("7");$(".0-9 .2-0-3").1().1().1().4("8")};',15,15,'slide|next|swiper|active|addClass|ha|next1|next2|next3|hc|function|removeClass|next4|his_position|his_positiona'.split('|'),0,{})) // var slideHc = new Swiper('.slide-hc', { // spaceBetween: 0, // autoplay: { // delay: 5000, // stopOnLastSlide: false,disableOnInteraction: false}, // speed:1000, // loop:true, // breakpoints: { // 320: { // slidesPerView: 2, // spaceBetween: 15, // }, // 420: { // slidesPerView:3, // spaceBetween: 20 // }, // 1024: { // slidesPerView:4, // spaceBetween: 30 // } // }, // // navigation: {nextEl: '.slide-hcp .next',prevEl: '.slide-hcp .prev',}, // on: { // init: function(swiper){his_positiona();}, // transitionStart: function (swiper) {his_positiona();} // }, // }); // swiper3.el.onmouseover = function(){ // swiper3.autoplay.stop(); // } // swiper3.el.onmouseout = function(){ // swiper3.autoplay.start(); // } // swiper4.el.onmouseover = function(){ // swiper4.autoplay.stop(); // } // swiper4.el.onmouseout = function(){ // swiper4.autoplay.start(); // } // $(".h5-ico1 .h5-ico").html('资源 183'); // $(".sicoh .h5-ico").each(function (i) { $(this).find('svg').attr('id', 'svg-' + (i + 1)) }) // var g = []; // if (!isIE()) { // $(".sicoh .h5-ico svg").each(function (a, b) { // a = $(this).attr("id"); // g[a] = new Vivus(a, { // type: "delayed", // duration: 80, // inViewport: true, // autostart: true, // }) // }); // $(".sicoh").mouseenter(function () { // g[$(this).find("svg").attr("id")].reset().play() // }); // } // $('.new3-swiper1 ul').slick({ // slidesToShow: 1, // slidesToScroll: 1, // arrows: false, // fade: true, // autoplay:true, // asNavFor: '.new3-swiper2 ul,.new4-swiper1 ul' // }); // $('.new3-swiper2 ul').slick({ // slidesToShow: 5, // slidesToScroll: 1, // autoplay:true, // asNavFor: '.new3-swiper1 ul,.new4-swiper1 ul', // focusOnSelect: true, arrows: false, // responsive: [ // { // breakpoint: 1200, // settings: { // slidesToShow: 4, // } // }, // { // breakpoint: 768, // settings: { // slidesToShow: 3, // } // }, // { // breakpoint: 420, // settings: { // slidesToShow: 2, // } // } // ] // }); // $('.new4-swiper1 ul').slick({ // slidesToShow: 1, // slidesToScroll: 1, // arrows: true, // fade: true, // autoplay:true, // focusOnSelect: true, // asNavFor: '.new3-swiper1 ul,.new3-swiper2 ul' // }); // $('.h6-slick').slick({ // arrows: false, // speed: 300, // fade: true,swipe:false // }) // $('.arrow .swiper-button-prev').click(function () { // $('.h6-slick').slick("prev") // }); // $('.arrow .swiper-button-next').click(function () { // $('.h6-slick').slick("next") // }); // var per2 = new Swiper('.h3-t2', { // loop: true, // speed: 1000, // loopedSlides: 1, // effect : 'fade', // fadeEffect: { // crossFade: true, // }, // // autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: false }, // navigation: { // nextEl: '.h3-right .swiper-button-next', // prevEl: '.h3-right .swiper-button-prev', // }, // breakpoints: { // // 320: { // // slidesPerView: 2, // // }, // // 420: { // // slidesPerView: 3, // // }, // // 768: { // // slidesPerView: 4, // // }, // // 1024: { // // slidesPerView: 3, // // } // } // }); // var per1 = new Swiper('.h3-t1', { // loop: true, // speed: 1000, // loopedSlides: 1, // // centeredSlides: true, // effect : 'fade', // fadeEffect: { // crossFade: true, // } // }); // per1.controller.control = per2;//Swiper1控制Swiper2,需要在Swiper2初始化后 // per2.controller.control = per1; //视频 // var sz2 = new Swiper('.new5-swiper2', { // speed: 1000, // loop: true, // spaceBetween: 0, // loopedSlides: 3, // effect: 'fade', // fadeEffect: { // crossFade: true, // }, // // autoplay: { delay: 6000, stopOnLastSlide: false, disableOnInteraction: false }, // autoplay: { delay: 6000 }, // breakpoints: { // 320: { // loopedSlides: 2, // }, // 1024: { // loopedSlides: 3, // }, // }, // }); // // vde1.el.onmouseover = function(){ // // vde1.autoplay.stop(); // // } // // vde1.el.onmouseout = function(){ // // vde1.autoplay.start(); // // } // var sz1 = new Swiper('.new5-swiper1', { // loop: true, // speed: 1000, // freeMode: true, // watchSlidesProgress: true, // slideToClickedSlide: true, // pagination: { // el: '.swiper-pagination', // clickable: true, // }, // breakpoints: { // 320: { // slidesPerView: 2, // loopedSlides: 2, // spaceBetween: 10, // }, // 1024: { // slidesPerView: 3, // loopedSlides: 3, // spaceBetween: 40, // centeredSlides: true, // }, // }, // }); // sz1.controller.control = sz2; // sz2.controller.control = sz1;