$(function(){ var wow = new WOW({}); wow.init(); $('.head-main .head-nav .item').hover(function(){ $(this).find('.subnav-box').fadeIn().stop(true,true).animate({top:'100%',opacity:'1'},300); },function(){ $(this).find('.subnav-box').fadeOut().stop(true,true).animate({top:'80%',opacity:'0'},0) }); $(window).scroll(function(){ }); $(".head-search").click(function(){ $(".search-box").stop().fadeIn(); }); $(".search-box-bg").click(function(){ $(".search-box").stop().fadeOut(); }); $(".head-staff").click(function(){ $(".oa-login, .staff-login").stop().fadeIn(); }); $(".head-customer").click(function(){ $(".oa-login, .customer-login").stop().fadeIn(); }); $(".oa-login .shadow-bg, .oa-login .oa-close").click(function(){ $(".oa-login, .other-login").stop().fadeOut(); }); //杩斿洖椤堕儴 $(".gotop").click(function() { return $("body,html").animate({ scrollTop: 0 }, 500), !1 }); $(window).scroll(function(){ var scrollT = $(window).scrollTop(); if (scrollT > 100) { $(".i-head").addClass("head-on"); }else { $(".i-head").removeClass("head-on"); } if(scrollT > 400){ $('.fixed-tool').fadeIn(300); }else{ $('.fixed-tool').fadeOut(300); } }) $(".fix-act .close").click(function(){ $(".fix-act").addClass("small"); // $(".fix-act a").attr("href","javascript:;"); }); $(".fix-act .main").click(function(){ $(".fix-act").removeClass("small"); // $(".fix-act a").attr("href","https://www.wjx.cn/vj/thIxrTZ.aspx"); }); var banSwiper = new Swiper(".banner-container", { speed: 800, effect: 'fade', autoplay: { delay: 16000, disableOnInteraction: false, }, loop: true, navigation: { prevEl: '.banner-container .prev', nextEl: '.banner-container .next', }, on: { init: function() { swiperAnimateCache(this); //闅愯棌鍔ㄧ敾鍏冪礌 swiperAnimate(this); //鍒濆鍖栧畬鎴愬紑濮嬪姩鐢 }, slideChangeTransitionStart: function() { swiperAnimate(this); //姣忎釜slide鍒囨崲缁撴潫鏃朵篃杩愯褰撳墠slide鍔ㄧ敾 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 鍔ㄧ敾鍙睍鐜颁竴娆★紝鍘婚櫎ani绫诲悕 } } }); var iService = new Swiper('.i-service-img', { autoplay: { delay: 5000, disableOnInteraction: false, }, speed: 500, effect: 'fade', fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".i-service-tabs .active").removeClass("active"); $(".i-service-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".i-service-tabs a").on("hover", function(e){ e.preventDefault(); $(".i-service-tabs .active").removeClass("active"); $(this).addClass("active"); iService.slideTo($(this).index()); }); var iCity = new Swiper('.i-city-container', { speed: 500, effect: 'fade', fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".city-point .active").removeClass("active"); $(".city-point div").eq(this.activeIndex).addClass("active"); } } }); $(".city-point div").on("hover", function(e){ e.preventDefault(); $(".city-point .active").removeClass("active"); $(this).addClass("active"); iCity.slideTo($(this).index()); }); var iarticleSwiper = new Swiper(".i-article-container", { slidesPerView: 1, slidesPerGroup : 1, spaceBetween: 20, speed: 1000, autoplay: true, breakpoints: { 1024: { slidesPerView: 'auto', slidesPerGroup : 2, spaceBetween: 40, }, }, pagination: { el: '.i-article-pagination', clickable: true, }, navigation: { nextEl: '.i-article-btn .next', prevEl: '.i-article-btn .prev', }, }); // 璧拌繘鑹捐开搴 var aboutWrap2 = new Swiper('.about-wrap2-container', { slidesPerView: 2, slidesPerGroup : 2, spaceBetween: 0, speed: 800, breakpoints: { 1024: { slidesPerView: 4, slidesPerGroup : 4, }, }, }); $(".about-wrap2 .prev").click(function(){ aboutWrap2.slidePrev(); }); $(".about-wrap2 .next").click(function(){ aboutWrap2.slideNext(); }); var aboutWrap3 = new Swiper('.about-wrap3-container', { watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, loop: true, loopedSlides: 5, autoplay: true, navigation: { nextEl: '.about-wrap3-btn .next', prevEl: '.about-wrap3-btn .prev', }, on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.3 + 1; } translate = slideProgress * modify * 260 + 'px'; scale = 1 - Math.abs(slideProgress) / 5; zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 3) { slide.css('opacity', 0); } } }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); $(".about-wrap3-main .prev").click(function(){ aboutWrap3.slidePrev(); }); $(".about-wrap3-main .next").click(function(){ aboutWrap3.slideNext(); }); var articleSwiper = new Swiper(".article-list-container", { effect: 'fade', speed: 1200, autoplay: true, loop: true, pagination: { el: '.article-list-pagination', clickable: true, }, }); // 妫€楠屼笓涓 $(".sys-lc-item .item-top").click(function() { var nowItemParent = $(this).parents(".sys-lc-item"); nowItemParent.siblings().removeClass("active").children(".item-con").stop().slideUp(); nowItemParent.toggleClass("active").children(".item-con").stop().slideToggle(); }); var sysBl = new Swiper('.sys-bl-container', { speed: 800, effect: 'fade', autoHeight: true, fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".sys-bl-tabs .active").removeClass("active"); $(".sys-bl-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".sys-bl-tabs a").on("hover", function(e){ e.preventDefault(); $(".sys-bl-tabs .active").removeClass("active"); $(this).addClass("active"); sysBl.slideTo($(this).index()); }); var ypSlide3 = new Swiper(".yp-slide3-container", { slidesPerView: 1, spaceBetween: 20, speed: 1000, loop: true, autoplay: { delay: 3000, disableOnInteraction: false, }, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 50, }, 1024: { slidesPerView: 3, spaceBetween: 100, }, 1366: { slidesPerView: 3, spaceBetween: 154, }, }, }); $(".yp-slide3-btn .prev").click(function(){ ypSlide3.slidePrev(); }); $(".yp-slide3-btn .next").click(function(){ ypSlide3.slideNext(); }); var ypSlide4 = new Swiper(".yp-slide4-container", { slidesPerView: 1, spaceBetween: 20, speed: 1000, loop: true, autoplay: { delay: 3000, disableOnInteraction: false, }, breakpoints: { 768: { slidesPerView: 2, spaceBetween: 20, }, 1024: { slidesPerView: 3, spaceBetween: 20, }, 1366: { slidesPerView: 4, spaceBetween: 36, }, }, }); $(".yp-slide4-btn .prev").click(function(){ ypSlide4.slidePrev(); }); $(".yp-slide4-btn .next").click(function(){ ypSlide4.slideNext(); }); var zlglSlide = new Swiper(".zlgl-wrap3-container", { slidesPerView: 1, spaceBetween: 40, breakpoints: { 1024: { slidesPerView: 3, spaceBetween: 30, centeredSlides : true, centeredSlidesBounds: true, }, }, loop: true, speed: 1000, }); $(".zlgl-wrap3-btn .prev").click(function(){ zlglSlide.slidePrev(); }); $(".zlgl-wrap3-btn .next").click(function(){ zlglSlide.slideNext(); }); // 鍐烽摼鐗╂祦 var llwlSlide7 = new Swiper(".llwl-wrap7-container", { slidesPerView: 2, spaceBetween: 10, speed: 1000, // loop: true, breakpoints: { 1024: { slidesPerView: 4, spaceBetween: 36, }, }, autoplay: { delay: 3000, disableOnInteraction: false, }, }); $(".llwl-wrap7-btn .prev").click(function(){ llwlSlide7.slidePrev(); }); $(".llwl-wrap7-btn .next").click(function(){ llwlSlide7.slideNext(); }); var mediaW = $(window).width(); var llwlSwiper = new Swiper('.llwl-wrap4-container', { watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, loop: true, loopedSlides: 3, // autoplay: true, grabCursor:true, speed: 600, navigation: { nextEl: '.llwl-wrap4-btn .next', prevEl: '.llwl-wrap4-btn .prev', }, on: { progress: function(progress) { for (i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i); var slideProgress = this.slides[i].progress; modify = 1; if (Math.abs(slideProgress) > 1) { modify = (Math.abs(slideProgress) - 1) * 0.8 + 1; } if(mediaW>768){ translate = slideProgress * modify * 200+ 'px'; }else{ translate = slideProgress * modify * 150 + 'px'; } scale = 1 - Math.abs(slideProgress) / 3; zIndex = 999 - Math.abs(Math.round(10 * slideProgress)); slide.transform('translateX(' + translate + ') scale(' + scale + ')'); slide.css('zIndex', zIndex); slide.css('opacity', 1); if (Math.abs(slideProgress) > 2) { slide.css('opacity', 0); } } }, setTransition: function(transition) { for (var i = 0; i < this.slides.length; i++) { var slide = this.slides.eq(i) slide.transition(transition); } } } }); // 涓村簥鏈嶅姟 $(".now-nav").click(function(){ $(this).find("span").toggleClass("on"); $(".solution-nav-drop").stop(true,true).slideToggle("slow"); }); var userBan = new Swiper(".user-banner", { speed: 800, effect: 'fade', autoplay: { delay: 5000, disableOnInteraction: false, }, loop: true, navigation: { prevEl: '.user-banner .prev', nextEl: '.user-banner .next', }, pagination: { el: '.user-pagination', clickable: true, }, on: { init: function() { swiperAnimateCache(this); //闅愯棌鍔ㄧ敾鍏冪礌 swiperAnimate(this); //鍒濆鍖栧畬鎴愬紑濮嬪姩鐢 }, slideChangeTransitionStart: function() { swiperAnimate(this); //姣忎釜slide鍒囨崲缁撴潫鏃朵篃杩愯褰撳墠slide鍔ㄧ敾 //this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); 鍔ㄧ敾鍙睍鐜颁竴娆★紝鍘婚櫎ani绫诲悕 } } }); var userSlide = new Swiper('.user-slide-container', { speed: 800, effect: 'fade', autoHeight: true, fadeEffect: { crossFade: true, }, on: { slideChangeTransitionStart: function(){ $(".user-slide-tabs .active").removeClass("active"); $(".user-slide-tabs a").eq(this.activeIndex).addClass("active"); } } }); $(".user-slide-tabs a").on("hover", function(e){ e.preventDefault(); $(".user-slide-tabs .active").removeClass("active"); $(this).addClass("active"); userSlide.slideTo($(this).index()); }); // 鎵嬫満 $('.head-menu').click(function(){ $(this).toggleClass('head-menu-close'); $('.head').toggleClass('head-open'); }); $('.mhead-main .head-nav .item-links').click(function(){ $(this).siblings('.subnav-box').stop().slideToggle("slow"); $(this).find('.iconfont').toggleClass("iconfont-rotate"); }); $(".banner .bfimg").click(function(){ $(this).hide(); $(this).parent().find("video").show(); $(this).parent().find("video").trigger('play'); }); // 鍚勭鑷€傚簲 var winW = $(document).width(); function widthChange(){ if(winW < 1024){ } } widthChange(); $(window).resize(function() { widthChange(); }); });