$(function () { var interleaveOffset = 0.3; browserRedirect(); //妫€鏌ュ钩鍙 const swiperFullPage = new Swiper('.swiperFullPage', { direction: 'vertical', // Slides鐨勬粦鍔ㄦ柟鍚?鍨傜洿 mousewheel: true, // 寮€鍚紶鏍囨粴杞帶鍒禨wiper鍒囨崲銆 speed: 500, slidesPerView: 'auto', // 璁剧疆slider瀹瑰櫒鑳藉鍚屾椂鏄剧ず鐨剆lides鏁伴噺(carousel妯″紡)銆?auto'鍒欒嚜鍔ㄦ牴鎹畇lides鐨勫搴︽潵璁惧畾鏁伴噺銆 watchSlidesProgress: true, mousewheel: true, hashNavigation: true, //涓烘瘡涓猻lide澧炲姞鏁e垪瀵艰埅锛堟湁鐐瑰儚閿氶摼鎺ワ級 // 鍒嗛〉鍣 pagination: { el: '.swiperFullPage>.swiper-pagination', clickable: true, }, on: { // init: function() { // swiperAnimateCache(this); // swiperAnimate(this); // }, // transitionEnd: function() { // swiperAnimate(this); // }, touchStart: function () { var swiper = this; for (var i = 0; i < swiper.slides.length; i++) { swiper.slides[i].style.transition = ""; } }, slideChange: function () { this.activeIndex != 0 ? $(".header").addClass("open") : $(".header").removeClass("open"); this.activeIndex != 0 ? $(".topInfo").addClass("close") : $(".topInfo").removeClass("close"); // if (this.activeIndex == 2) { // setTimeout(function() { // guonei.start(); // chenggui.start(); // qian.start(); // }, 1500) // } console.log(this.activeIndex) if (this.activeIndex >= 6) { $(".tips").addClass("active"); } else { $(".tips").removeClass("active"); } }, }, }); // 杞挱鍥 // const banner = new Swiper('.homeBanner', { // direction: 'horizontal', // 鍨傜洿鍒囨崲閫夐」 // loop: true, // 寰幆妯″紡閫夐」 // autoplay: { // delay: 3000 // }, // paginationClickable: true, // observer: true, // // autoplayDisableOnInteraction:false, // onTransitionEnd: function (banner) { // if ($('.swiper-slide-active').children().hasClass('banner-video')) { // $('.swiper-slide-active video')[0].paly(); // banner.stopAutoplay(); // banner.params.autoplay - 10; // } // }, // pagination: { // el: '.homeBanner>.swiper-pagination', // clickable: true, // }, // }); // $('.swiper-slide-active video').on('play', function () { // banner.stopAutoplay(); // }); // if ($('.swiper-slide-active').children().hasClass('banner-video')) { // $('.swiper-slide-active video')[0].paly(); // } // $('.swiper-slide-active video').on('play', function () { // banner.stopAutoplay(); // }); const banner = new Swiper('.homeBanner', { direction: 'horizontal', // 鍨傜洿鍒囨崲閫夐」 loop: true, // 寰幆妯″紡閫夐」 speed:2500, autoplay: { delay: 5000 }, pagination: { el: '.homeBanner>.swiper-pagination', clickable: true, }, }); //鍘嗙▼ const progress = new Swiper('.progress', { direction: 'horizontal', // 鍨傜洿鍒囨崲閫夐」 loop: true, // 寰幆妯″紡閫夐」 centeredSlides: true, autoplay: false, slidesPerView: 3, spaceBetween: 30, breakpoints: { 768: { slidesPerView: 1, spaceBetween: 0, }, 900: { slidesPerView: 2, spaceBetween: 15, }, }, navigation: { nextEl: '.progress-prev-next-btn .swiper-button-next', prevEl: '.progress-prev-next-btn .swiper-button-prev', }, }); // 瑙e喅鏂规 鑳屾櫙鍥惧垏鎹 const solutionItembackgroundImg = new Swiper('.solutionItembackgroundImg', { paginationClickable: true, effect: 'fade', slidesPerView: 1, pagination: { el: '.solutionItembackgroundImg>.swiper-pagination', clickable: true, }, on: { // slideChangeTransitionStart: function () { // $(".solutionItem .active").removeClass('active'); // $(".solutionItem .item").eq(this.activeIndex).addClass('active'); // }, // init: function(swiper){ // $(".solutionItem .item").eq(this.activeIndex).addClass('active'); // }, } }); $(".solutionItem .item").on('mouseover', function (e) { e.preventDefault(); solutionItembackgroundImg.slideTo($(this).index()); }); //鍏徃鑽h獕 const honorSty1 = new Swiper('.honorSty1', { slidesPerView: 5, autoplay: { delay: 3000 }, breakpoints: { 990: { slidesPerView: 3, }, 768: { slidesPerView: 2, }, 390: { slidesPerView: 2, spaceBetween: 20, slidesPerColumn: 2, }, } }); const honorSty2 = new Swiper('#honorSty2', { slidesPerView: 3, spaceBetween: 30, autoplay: { delay: 3000 }, breakpoints: { 990: { slidesPerView: 3, }, 768: { slidesPerView: 2, slidesPerColumn: 2, }, 560: { slidesPerView: 1, slidesPerColumn: 2, }, } }); //鍏徃鏂伴椈 const news = new Swiper('.newsListBox', { slidesPerView: 3, spaceBetween: 40, scrollbar: { el: '.swiper-scrollbar', }, breakpoints: { 1200: { slidesPerView: 2, }, 768: { slidesPerView: 1, }, } }); // 骞垮憡 const ad = new Swiper('.adListBox', { slidesPerView: 3, spaceBetween: 40, scrollbar: { el: '.swiper-scrollbar', }, breakpoints: { 1200: { slidesPerView: 2, }, 768: { slidesPerView: 1, }, } }); // 鍚堜綔瀹㈡埛 const partner = new Swiper('.partnerBox', { slidesPerView: 6, spaceBetween: 40, slidesPerColumn: 3, // slidesPerColumnFill : 'row', breakpoints: { 768: { slidesPerView: 3, slidesPerColumn: 6, }, 390: { slidesPerView: 2, spaceBetween: 20, slidesPerColumn: 6, }, }, navigation: { nextEl: '.partner-prev-next-btn .swiper-button-next', prevEl: '.partner-prev-next-btn .swiper-button-prev', }, }); //寰俊锛岄拤閽 $(".contactInfo .right .icon-weixin").hover(function () { $(".contactInfo .right .weixin").toggle(); }); $(".contactInfo .right .icon-pinpaibiaoshi-dingding").hover(function () { $(".contactInfo .right .dingding").toggle(); }); // 缁欏悎浣滃鎴风殑LOGO鍔犲姩鏁 $(".partnerList .item:nth-child(odd)").addClass("delay-1"); $(".partnerList .item:nth-child(even)").addClass("delay-2"); }); //妫€娴嬪钩鍙 function browserRedirect() { var sUserAgent = navigator.userAgent.toLowerCase(); if (/ipad|iphone|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/.test(sUserAgent)) { $(".banner-video").remove(); } else { } };