/*****************/ function stopBubble(e) { // 濡傛灉浼犲叆浜嗕簨浠跺璞★紝閭d箞灏辨槸闈瀒e娴忚鍣 if (e && e.stopPropagation) { //鍥犳瀹冩敮鎸乄3C鐨剆topPropagation()鏂规硶 e.stopPropagation(); } else { //鍚﹀垯鎴戜滑浣跨敤ie鐨勬柟娉曟潵鍙栨秷浜嬩欢鍐掓场 window.event.cancelBubble = true; } } var tap = "ontouchstart" in document ? "touchend" : "click"; var winWt = parseInt($(window).width()), winHt = parseInt($(window).height()); //瀹炵幇婊氬姩鏉℃棤娉曟粴鍔 var winHadntScroll = function(e) { // e.preventDefault(); }; // scrollStop() /***绂佹婊戝姩***/ function scrollStop() { var h = $(window).height(); document.body.style.overflow = "hidden"; document.addEventListener("touchmove", winHadntScroll, { passive: false }); //绂佹椤甸潰婊戝姩 } /***鍙栨秷婊戝姩闄愬埗***/ function scrollMove() { document.body.style.overflow = ""; //鍑虹幇婊氬姩鏉 document.removeEventListener("touchmove", winHadntScroll, { passive: false }); } /// 閿氱偣璺宠浆 function anchorMove(id, fn) { var $obj = $(id), moveFun = fn; var oh = $obj.offset().top - parseInt($(".header").outerHeight()); $("html,body").animate({ scrollTop: oh, }, 300, function() { if (moveFun) moveFun(); } ); } /// 绔栧悜婊氬姩鏉 if ($(".scrollbox").length > 0) { $(".scrollbox").mCustomScrollbar({ scrollInertia: 1000, advanced: { updateOnContentResize: true, }, }); } /// 妯悜婊氬姩鏉 if ($(".scrollbox2").length > 0) { $(".scrollbox2").mCustomScrollbar({ axis: "x", mouseWheel: true, advanced: { updateOnContentResize: true, }, }); } // 椤甸潰婊氬姩wow.js鍐峣e9浠ヤ笂寮曠敤 var wow = new WOW({ boxClass: "wow", animateClass: "animated", offset: 100, mobile: true, live: true, }); if (!/msie [6|7|8|9]/i.test(navigator.userAgent)) { wow.init(); } // 妯℃€佹 $(".modal").on("shown.bs.modal", function() { $("body").addClass("modal-open"); }); $(".modal").on("hidden.bs.modal", function() { if ($(this).find("video").length) { var videoId = $(this).find(".video-js").attr("id"); var myplayer = videojs(videoId); myplayer.pause(); myplayer.currentTime(0); } }); $(".modal-close") .off(tap) .on(tap, function() { var $modal = $(this).parents(".modal"); $modal.modal("hide"); }); // 鍒ゆ柇璁惧 var os = (function() { var ua = navigator.userAgent, isWindowsPhone = /(?:Windows Phone)/.test(ua), isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone, isAndroid = /(?:Android)/.test(ua), isIOS = !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), isFireFox = /(?:Firefox)/.test(ua), isChrome = /(?:Chrome|CriOS)/.test(ua), isTablet = /(?:iPad|PlayBook)/.test(ua) || (isAndroid && !/(?:Mobile)/.test(ua)) || (isFireFox && /(?:Tablet)/.test(ua)), isPhone = /(?:iPhone)/.test(ua) && !isTablet, isPc = !isPhone && !isAndroid && !isSymbian; return { isTablet: isTablet, isPhone: isPhone, isAndroid: isAndroid, isIOS: isIOS, isPc: isPc, }; })(); // 鍒ゆ柇鏄惁寰俊 function is_weixin() { var ua = navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == "micromessenger") { return true; } else { return false; } } if (!os.isPc) { $("body").addClass("is-iphone"); } else { $("body").addClass("is-pc"); } if (os.isAndroid) { $("body").addClass("is-android"); } if (os.isIOS) { $("body").addClass("is-ios"); } if (is_weixin()) { $("body").addClass("is-wx"); } else { $("body").addClass("not-wx"); } // 鍗曢€夋 $(".check-list label").on(tap, function() { $(this) .parent("li") .addClass("is-checked") .siblings() .removeClass("is-checked"); }); // 瑙嗛 $(".btn-open_video").on(tap, function() { $(".modal-video").modal("show"); }); $('[data-toggle="tab"]').on(tap, function() { var id = $(this).attr("href"), $lis = $(this).parent("li"); $(this).tab("show"); $lis.addClass("active").siblings().removeClass("active"); }); /******************************/ // PC绔鑸 $(".head-navlist > li").on("mouseenter", function() { $(this) .addClass("active") .find(".subnav-box") .stop(true, true) .slideDown(300) .end() .siblings("li") .removeClass("active") .find(".subnav-box") .hide(); // $('.header .had-subnav.activeD::after').hide() $(".head-navlist .navlv1").removeClass("hab-subnav activeX"); if ($(this).hasClass("had-subnav")) $(".header").addClass("open-subnav1"); }) .on("mouseleave", function() { $(this).removeClass("active").find(".subnav-box").hide(); $(".header").removeClass("open-subnav"); $(".head-navlist > li.current").addClass("active"); $(".head-navlist .activeW").addClass("activeX"); // $(this).find(".activeW").addClass("activeX"); }); // 榧犳爣缁忚繃椤靛ご浜嬩欢 // 鍥炲埌椤堕儴 $('.backtop').hide(); $(window).scroll(function() { if ($(this).scrollTop() > 100) { $('.backtop').fadeIn(); } else { $('.backtop').fadeOut(); } }); $('.backtop').on('click', function() { $('html,body').animate({ 'scrollTop': '0' }) }) // 搴曢儴鎶€鏈敮鎸 if ($('.foot-jszc_swip').length) { var footJsSwip = new Swiper('.foot-jszc_swip', { direction: 'vertical', autoplay: { delay: 1000, disableOnInteraction: false, }, loop: true, observer: true, observeParents: true, }); } // $(".header").on("mouseover", function() { // $('body').addClass('head-white') // }) // $(".header").on("mouseleave", function() { // $('body').removeClass('head-white') // }) // 瀵艰埅 $(window).scroll(function() { if ($(window).scrollTop() > 0) { $('body').addClass('head-white'); $(".header").on("mouseleave", function() { $('body').addClass('head-white') }) } else if ($(window).scrollTop() < 2) { $('body').removeClass('head-white'); $(".header").on("mouseleave", function() { $('body').removeClass('head-white') }) } }) // if ($(window).scrollTop() == 0) { // $('body').removeClass('head-white'); // } // $('.nav-rightbox .searchbox').on('click', function() { // $('.search-box').slideToggle(); // $('.bbg1').toggleClass('blackbgShow'); // if ($(window).scrollTop() == 0) { // $('.header').toggleClass('head-white1'); // } // }) var windowWidth = $(window).width() // 鎼滅储鏍 $('.gg-search').on('click', function(e) { $('.search-box').slideToggle(300, 'linear'); stopBubble(e) // e.stopPropagation(); // e.preventDefault(); // $('.ph-nav-box').removeClass('on') // $('.ph-nav-box').removeClass('on') // $('.head-menu_open').removeClass('on') // $('.head-menu_open').removeClass('open') $('body').toggleClass("head-white1") $('.ph-nav-box').removeClass('on') $('.ph-nav-box').removeClass('open') $('.head-menu_open').removeClass('on') $('.head-menu_open').removeClass('open') $('body').toggleClass("head-white-s") $('body').removeClass("head-white-c") $('body').removeClass("open") // $('body').css('overflow', 'inherit') }) // 绉诲姩绔鑸 $(".head-menu_open").on('click', function() { $(".language").removeClass("language-open") // $('body').toggleClass("head-white1") $('body').toggleClass("open") $(this).toggleClass("open") $(".ph-nav-box").toggleClass("on"); }); $('.headItem').click(function() { $(this).find('.headB').stop(true).slideToggle(200) }) $(".ph-nav-box .lvbox").each(function() { $(this).siblings(".lv").find("em").show(); }); $(".lv1 em").on('click', function() { $(this).parents(".lv1").toggleClass("on").end() .parents(".lv1").siblings(".lv2box").stop(true, true).slideToggle(300).end() .parent("li").siblings().find(".lvbox").slideUp(300).siblings(".lv").removeClass("on"); }); $(".lv2 em").on('click', function() { $(this).parents(".lv2").toggleClass("on").end() .parents(".lv2").siblings(".lv3box").stop(true, true).slideToggle(300).end() .parents(".item").siblings().find(".lvbox").removeClass("on").slideUp(300).siblings(".lv").removeClass("on"); }); $(".lv3 em").on('click', function() { $(this).parents(".lv3").toggleClass("on").end() .parents(".lv3").siblings(".lv4box").stop(true, true).slideToggle(300).end() .parents(".item").siblings().find(".lvbox").slideUp(300).siblings(".lv").removeClass("on"); }); // 缁勭粐鏋舵瀯 // $(".company-pop .box .list-box").find(".") // console.log($(".company-pop.mob .boxs .right .box .items .list-box .item-box").length) if ($(".company-pop.mob .boxs .right .box .items .list-box .item-box").length > 0) { // console.log(this) $(".company-pop.mob .boxs .right .box .items .list-box .item-box").parents(".items").find(".title-box .more").addClass("yes-list") } else { $(".company-pop.mob .boxs .right .box .items .list-box .item-box").parents(".items").find(".title-box .more").addClass("no-list") } $(".company-pop.mob .boxs .right .box .items .title-box").on('click', function() { // $(this).parents(".items").find(".list-box").addClass("tt1") $(this) .parents(".items").addClass("activeTit").end() .parents(".items").siblings().removeClass("activeTit").end(); // .parents(".items").siblings(".list-box").stop(true, true).slideToggle(300).end() $(this).parents(".items").find(".list-box").stop(true, true).slideToggle(300).end(); $(this).parents(".items").siblings().find(".list-box").slideUp(300).siblings(".title-box").removeClass("on"); // .parents(".items.on").find(".list-box").slideToggle(300).end() // .parent(".items").siblings().find(".list-box").slideUp(300).removeClass("on"); }); $(".language").on('click', function() { $(this).toggleClass("language-open") }) var windowWidth = $(window).width() // 鍒ゆ柇涓婁笅婊氬姩 // if (windowWidth <= 991.98) { // if (windowWidth > 992) { $(document).ready(function() { var p = 0, t = 0; var sclTop = $(window).scrollTop(); $(window).scroll(function(e) { p = $(this).scrollTop(); if (t <= p) { // console.log('鍚戜笅婊?); // if (sclTop > 100) { $("body").addClass("page-down") console.log(111); // } } else { // console.log('鍚戜笂婊?); // if (sclTop < 100) { $("body").removeClass("page-down") console.log(222); // } // console.log(sclTop, '婊氬姩璺濈') } setTimeout(function() { t = p; }, 300); }); }) // } $(".footer .foot-t1 .link ul a").on('click', function() { if ($(this)[0]) { console.log('id') } else { console.log('noid') } }) /*** 鍏叡 ****/ // 鍏叡鏍峰紡 // 娣诲姞wow $(window).on("load", function() { // 閾惰鍗′笟鍔 if ($(".gscet-13").length) { $(".gscet-13").addClass("animated fadeInUp2"); $(".bank5-swiper .image").addClass("wow fadeInUp2"); $(".bank5-swiper .item-hd").addClass("wow fadeInUp2"); } // 棣栭〉 if ($(".home-sect1").length) { $(".home-sect1").addClass("wow fadeInUp2"); } if (wow && !/msie [6|7|8|9]/i.test(navigator.userAgent)) { wow.init(); } }); // 鍐呴〉banner杞挱 var publicBanner = new Swiper(".public-banner", { speed: 500, watchOverflow: true, slidesPerView: 1, disableOnInteraction: false, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, observeParents: true, observer: true, navigation: { nextEl: ".public-banner-btn-next", prevEl: ".public-banner-btn-prev", }, pagination: { el: ".public-banner-btn", clickable: true, }, }); if (publicBanner.slides.length <= 1) { $(".public-banner-btn").hide(); $(".public-banner-btn-next").hide(); $(".public-banner-btn-prev").hide(); $(".public-banner").addClass("swiper-no-swiping"); } // 鏂伴潰鍖呭睉鎵嬫満绔 if ($(".crumbs-new .box-mob .item-list").length) { $('.crumbs-new .box-mob .icon').on(tap, function(e) { $('body').toggleClass('mobCrumbs') $('.crumbs-new .box-mob .item-list').stop(true).slideToggle() e.stopPropagation(); }) $(document).on(tap, function() { $('.crumbs-new .box-mob .item-list').slideUp() $('body').removeClass('mobCrumbs') }); } // 鏂伴椈鏂囧瓧 var channel2Swiper = new Swiper(".channel1-swiper2", { // loop: true, speed: 500, watchOverflow: true, // effect: 'fade', // freeMode: true, watchSlidesProgress: true, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, breakpoints: { 0: { slidesPerView: 1, spaceBetween: 0, pagination: { el: ".channel1-btn2", }, }, 992: { spaceBetween: 40, pagination: { el: ".channel1-btn2", clickable: true, type: 'fraction', }, }, }, observeParents: true, observer: true, navigation: { nextEl: ".channel1-btn2-next", prevEl: ".channel1-btn2-prev", }, thumbs: { swiper: channel1Swiper, }, controller: { control: channel1Swiper } }); if (channel2Swiper.slides.length <= 1) { $(".channel1-btn2").hide(); $(".channel1-btn2-next").hide(); $(".channel1-btn2-prev").hide(); $(".channel1-swiper2").addClass("swiper-no-swiping"); } // 鏂伴椈鍥剧墖 var channel1Swiper = new Swiper(".channel1-swiper1", { // loop: true, observer: true, observeParents: true, // effect: 'fade', speed: 500, watchOverflow: true, spaceBetween: 0, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, breakpoints: { 0: { slidesPerView: 1, }, 992: { pagination: { el: ".channel1-btn", clickable: true, type: 'fraction', }, }, }, navigation: { nextEl: ".channel1-btn-next", prevEl: ".channel1-btn-prev", }, }); if (channel1Swiper.slides.length <= 1) { $(".channel1-btn").hide(); $(".channel1-btn-next").hide(); $(".channel1-btn-prev").hide(); $(".channel1-swiper1").addClass("swiper-no-swiping"); } // swiper鐩镐簰鎺у埗 channel1Swiper.controller.control = channel2Swiper channel2Swiper.controller.control = channel1Swiper var channel9Swiper = new Swiper(".channel9-swiper", { // loop: true, observer: true, observeParents: true, // effect: 'fade', speed: 500, watchOverflow: true, spaceBetween: 0, autoplay: { delay: 5000, stopOnLastSlide: false, disableOnInteraction: true, }, breakpoints: { 0: { slidesPerView: 1, }, 992: { pagination: { el: ".channel1-btn", clickable: true, type: 'fraction', }, }, }, navigation: { nextEl: ".channel9-btn-next", prevEl: ".channel9-btn-prev", }, }); if (channel9Swiper.slides.length <= 1) { $(".channel9-btn").hide(); $(".channel9-btn-next").hide(); $(".channel9-btn-prev").hide(); $(".channel9-swiper").addClass("swiper-no-swiping"); } // 浜烘墠鐞嗗康 寮€濮 if (windowWidth >= 991.98) { $('.channel11 .right .item').mouseover(function() { $(this).addClass('active').siblings().removeClass('active') $('.channel11 .left .item').eq($(this).index()).css('display', 'block').animate({ 'opacity': '1', 'display': 'block' }).siblings().css({ 'opacity': '0', 'display': 'none' }) }) } if (windowWidth <= 991.98) { // $('.channel11 .right .item').mouseover(function() { // $(this).addClass('active').siblings().removeClass('active') // // $('.channel11 .left .item').eq($(this).index()).css('display', 'block').animate({ // // 'opacity': '1', // // 'display': 'block' // // }).siblings().css({ // // 'opacity': '0', // // 'display': 'none' // // }) // }) $('.channel11 .right .item').on('click', function() { $(this).find('.doc').slideToggle().addClass('wd'); $(this).siblings().find('.doc').slideUp(); $(this).toggleClass('active').siblings().removeClass('active'); }); } // 浜烘墠鐞嗗康 缁撴潫 // 鍙寔缁彂灞 banner // $(".p-business .public-banner").addClass("wow fadeInUp2 animated") // $(".p-business .public-banner").attr("data-wow-delay", '.2s') // $(".p-business .public-banner .tit-box").addClass("fadeInUp2 animated") // $(".p-business .public-banner .tit-box").attr("data-wow-delay", '1s') // 鍙寔缁彂灞 var channel15Swiper2 = new Swiper(".channel15-swiper2", { observer: true, observeParents: true, direction: "vertical", slidesPerView: 1, spaceBetween: 0, mousewheel: true, autoHeight: true, // autoHeight: true, // width: 'auto', // height: 'auto', height: 80, // pagination: { // el: ".swiper-pagination", // clickable: true, // }, speed: 1000, on: { init: function() { var $slide = $(this.slides[this.activeIndex]); // console.log($(this.slides[this.activeIndex])) $slide.find('.doc').addClass('upDown wow fadeInUp2 animated') }, slideChangeTransitionEnd: function() { var $slide = $(this.slides[this.activeIndex]); // console.log($slide) $slide.find('.doc').addClass('upDown wow fadeInUp2 animated') .end() .siblings().find('.doc').removeClass('upDown wow fadeInUp2 animated'); // $('.channel15 .left .item').eq($(this).index()).css('display', 'block').animate({ // 'opacity': '1', // 'display': 'block' // }).siblings().css({ // 'opacity': '0', // 'display': 'none' // }) }, }, thumbs: { swiper: channel15Swiper1, }, controller: { control: channel15Swiper1 } }); // 鍙寔缁彂灞 var channel15Swiper1 = new Swiper(".channel15-swiper1", { observer: true, observeParents: true, touchEventsTarget: '#trans', direction: "vertical", slidesPerView: 1, spaceBetween: 50, mousewheel: true, // autoHeight: true, // width: 'auto', height: 'auto', // autoHeight: true, height: 80, // autoHeight: true, // pagination: { // el: ".swiper-pagination", // clickable: true, // }, speed: 600, breakpoints: { 0: { height: 36, spaceBetween: 25, // scrollbar: { // el: ".swiper-scrollbar1", // }, allowTouchMove: false, }, 992: { spaceBetween: 20, }, 1660: { spaceBetween: 50, } }, controller: { control: channel15Swiper2 }, on: { slideChangeTransitionStart: function() { var $slide = $(this.slides[this.activeIndex]); var item4 = $(".channel15-swiper1 .item-slide:eq(3)") if (item4.is(".swiper-slide-active")) { scrollMove() // console.log(1212312) } if (this.activeIndex == 0) { console.log(this.activeIndex) var num1 = 500 var time1 = setInterval(function() { num1++; if (num1 >= 1000) { clearInterval(time1) } $('.channel15-swiper1 .tit1 span').html(num1) // $(".channel15-swiper1").css('height', '4rem') }, 0.1) } if (this.activeIndex == 1) { var num2 = 500 var time2 = setInterval(function() { num2++; if (num2 >= 800) { clearInterval(time2) } $('.channel15-swiper1 .tit2 span').html(num2) if (windowWidth < 992) { // $(".channel15-swiper1").css('height', '3rem') } }, 0.1) } if (this.activeIndex == 2) { var num3 = 0 var time3 = setInterval(function() { num3++; if (num3 >= 33) { clearInterval(time3) } $('.channel15-swiper1 .tit3 span').html(num3) }, 40) } if (this.activeIndex == 3) { var num4 = 850 var time4 = setInterval(function() { num4++; if (num4 >= 999) { clearInterval(time4) } $('.channel15-swiper1 .tit4 span').html(num4) }, 0.1) } // console.log($slide) // $slide.find(".tit").addClass("jumpNum").siblings().removeClass('jumpNum') }, slideChangeTransitionEnd: function() { if (windowWidth > 992) { var $slide = $(this.slides[this.activeIndex]); $('.channel15 .left .item').eq(this.activeIndex).addClass('active wow fadeInUp2 animated').siblings().removeClass('active wow fadeInUp2 animated') } // console.log($slide) // $slide.parents(".channel15").find(".left .item").siblings($slide).addClass("qaz").siblings() // .removeClass("qaz") // $slide.find('.doc').addClass('upDown wow fadeInUp2 animated') // .end() // .siblings().find('.doc').removeClass('upDown wow fadeInUp2 animated'); }, // slideChange: function(){ // var $slide = $(this.slides[this.activeIndex]); // console.log('鏀瑰彉浜嗭紝activeIndex涓?+this.activeIndex); // $slide.find('.doc').removeClass('upDown wow fadeInUp2 animated'); // }, // slideChangeTransitionEnd: function() { // var $slide = $(this.slides[this.activeIndex]); // console.log($slide) // $slide.find('.doc').addClass('upDown wow fadeInUp2 animated') // .end() // .siblings().find('.doc').removeClass('upDown wow fadeInUp2 animated'); // }, // slidePrevTransitionStart: function(){ // var $slide = $(this.slides[this.activeIndex]); // console.log('鏀瑰彉浜嗭紝activeIndex涓?1'+this.activeIndex); // $slide.find('.doc').removeClass('upDown wow fadeInUp2 animated'); // }, } }); channel15Swiper1.controller.control = channel15Swiper2 channel15Swiper2.controller.control = channel15Swiper1 var businessLength1 = $(".channel17-swiper1.hidden-lg-down .item-box .item").length var businessLength2 = $(".channel17-swiper2.hidden-lg-down .item-box .item").length var businessLength3 = $(".channel17-swiper3.hidden-lg-down .item-box .item").length var businessLength4 = $(".channel17-swiper4.hidden-lg-down .item-box .item").length var businessLength5 = $(".channel17-swiper5.hidden-lg-down .item-box .item").length // console.log(businessLength1, '1') // console.log(businessLength2, '2') // console.log(businessLength3, '3') // console.log(businessLength4, '4') // console.log(businessLength5, '5') if (windowWidth > 991.98) { if (businessLength1 <= 6) { $(".channel17-swiper1-pagination").hide() $(".channel17-swiper1").addClass("swiper-no-swiping"); $(".channel17-swiper1").parents(".channel17").css('padding-bottom', '0') } if (businessLength2 <= 6) { $(".channel17-swiper2-pagination").hide() $(".channel17-swiper2").addClass("swiper-no-swiping"); $(".channel17-swiper2").parents(".channel17").css('padding-bottom', '0') } if (businessLength3 <= 6) { $(".channel17-swiper3-pagination").hide() $(".channel17-swiper3").addClass("swiper-no-swiping"); $(".channel17-swiper3").parents(".channel17").css('padding-bottom', '0') } // if (businessLength3 <= 6) { // $(".channel17-swiper1-pagination").hide() // } if (businessLength4 <= 6) { $(".channel17-swiper4-pagination").hide() $(".channel17-swiper4").addClass("swiper-no-swiping"); $(".channel17-swiper4").parents(".channel17").css('padding-bottom', '0') } if (businessLength5 <= 6) { $(".channel17-swiper5-pagination").hide() $(".channel17-swiper5").addClass("swiper-no-swiping"); $(".channel17-swiper5").parents(".channel17").css('padding-bottom', '2.5em') } // 涓氬姟棰嗗煙 // if (businessLength1 >= 6) { // $(".channel17-swiper1").addClass("swiper-wrap") var channel17Swiper1 = new Swiper(".channel17-swiper1", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill: 'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper1-pagination", clickable: true, }, }); // } // 涓氬姟棰嗗煙 // if (businessLength1 < 6) { // $(".channel17-swiper1 .item-box").addClass("swiper-nowrap") // var channel17Swiper1 = new Swiper(".channel17-swiper1", { // slidesPerView: 1, // spaceBetween: 30, // pagination: { // el: ".channel17-swiper1-pagination", // clickable: true, // }, // }); // } // 222222 // if (businessLength2 >= 6) { // $(".channel17-swiper2").addClass("swiper-wrap") var channel17Swiper2 = new Swiper(".channel17-swiper2", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill: 'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper2-pagination", clickable: true, }, }); // } // 涓氬姟棰嗗煙 // if (businessLength2 < 6) { // $(".channel17-swiper2").addClass("swiper-nowrap") // var channel17Swiper2 = new Swiper(".channel17-swiper2", { // slidesPerView: 3, // spaceBetween: 30, // pagination: { // el: ".channel17-swiper2-pagination", // clickable: true, // }, // }); // } // 333333 // if (businessLength3 >= 6) { // $(".channel17-swiper3").addClass("swiper-wrap") var channel17Swiper3 = new Swiper(".channel17-swiper3", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill: 'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper3-pagination", clickable: true, }, }); // } // 涓氬姟棰嗗煙 // if (businessLength3 < 6) { // $(".channel17-swiper3").addClass("swiper-nowrap") // var channel17Swiper3 = new Swiper(".channel17-swiper3", { // slidesPerView: 3, // spaceBetween: 30, // pagination: { // el: ".channel17-swiper3-pagination", // clickable: true, // }, // }); // } // 44444 // if (businessLength4 >= 6) { // $(".channel17-swiper4").addClass("swiper-wrap") var channel17Swiper4 = new Swiper(".channel17-swiper4", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill: 'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper4-pagination", clickable: true, }, }); // } // 涓氬姟棰嗗煙 // if (businessLength4 < 6) { // $(".channel17-swiper4").addClass("swiper-nowrap") // var channel17Swiper4 = new Swiper(".channel17-swiper4", { // slidesPerView: 3, // spaceBetween: 30, // pagination: { // el: ".channel17-swiper4-pagination", // clickable: true, // }, // }); // } // 55555 // if (businessLength5 >= 6) { // $(".channel17-swiper5").addClass("swiper-wrap") var channel17Swiper5 = new Swiper(".channel17-swiper5", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill: 'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper5-pagination", clickable: true, }, }); // } // 涓氬姟棰嗗煙 // if (businessLength5 < 6) { // $(".channel17-swiper5").addClass("swiper-nowrap") // var channel17Swiper5 = new Swiper(".channel17-swiper5", { // slidesPerView: 3, // spaceBetween: 30, // pagination: { // el: ".channel17-swiper5-pagination", // clickable: true, // }, // }); // } } var mobbusinessLength1 = $(".channel17-swiper1.hidden-lg-up .item-box .item").length var mobbusinessLength2 = $(".channel17-swiper2.hidden-lg-up .item-box .item").length var mobbusinessLength3 = $(".channel17-swiper3.hidden-lg-up .item-box .item").length var mobbusinessLength4 = $(".channel17-swiper4.hidden-lg-up .item-box .item").length var mobbusinessLength5 = $(".channel17-swiper5.hidden-lg-up .item-box .item").length // 鎵嬫満绔 if (windowWidth <= 991.98) { if (businessLength1 <= 2) { $(".channel17-swiper1-pagination").hide() $(".channel17-swiper1").addClass("swiper-no-swiping"); } if (businessLength2 <= 2) { $(".channel17-swiper2-pagination").hide() $(".channel17-swiper2").addClass("swiper-no-swiping"); } if (businessLength3 <= 2) { $(".channel17-swiper1-pagination").hide() $(".channel17-swiper3").addClass("swiper-no-swiping"); } if (businessLength4 <= 2) { $(".channel17-swiper4-pagination").hide() $(".channel17-swiper4").addClass("swiper-no-swiping"); } if (businessLength5 <= 2) { $(".channel17-swiper5-pagination").hide() $(".channel17-swiper5").addClass("swiper-no-swiping"); } // $(".channel17-swiper1").addClass("swiper-wrap") // $(".channel17-swiper2").addClass("swiper-wrap") // $(".channel17-swiper3").addClass("swiper-wrap") // $(".channel17-swiper4").addClass("swiper-wrap") // $(".channel17-swiper5").addClass("swiper-wrap") var channel17Swiper1 = new Swiper(".channel17-swiper1", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill:'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper1-pagination", clickable: true, // type: "progressbar", }, }); var channel17Swiper2 = new Swiper(".channel17-swiper2", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill:'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper2-pagination", clickable: true, // type: "progressbar", }, }); var channel17Swiper3 = new Swiper(".channel17-swiper3", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill:'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper3-pagination", clickable: true, // type: "progressbar", }, }); var channel17Swiper4 = new Swiper(".channel17-swiper4", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill:'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper4-pagination", clickable: true, // type: "progressbar", }, }); var channel17Swiper5 = new Swiper(".channel17-swiper5", { observer: true, observeParents: true, slidesPerView: 1, // slidesPerGroup: 1, spaceBetween: 30, // slidesPerColumnFill: "row", // height: 'auto', // grid: { // fill: 'row', // rows: 2, // }, // spaceBetween: 30, // slidesPerColumnFill:'row', // slidesPerColumnFill: "row", pagination: { el: ".channel17-swiper5-pagination", clickable: true, // type: "progressbar", }, }); } // 鍏充簬鎴戜滑鍙戝睍鍘嗙▼ var historSwiper = new Swiper(".history-swiper", { mousewheel: true, breakpoints: { 0: { slidesPerView: "auto", // slidesPerView: 2, }, 992: { slidesPerView: "auto", // slidesPerView: 4, }, }, pagination: { el: ".history-swiper-pagination", type: "progressbar", }, navigation: { nextEl: ".history-swiper-button-next", prevEl: ".history-swiper-button-prev", }, // on: { // slideChangeTransitionStart: function() { // // alert(this.activeIndex); // if (this.activeIndex = 0) { // $(".channel21 .end .global-inner1").removeClass("paddingL") // } else { // $(".channel21 .end .global-inner1").addClass("paddingL") // } // }, // } }); // 浼佷笟鏂囧寲 var channel22Swiper = new Swiper(".channel22-swiper", { breakpoints: { 0: { loop: true, slidesPerView: 1.2, height: 36, spaceBetween: 20, // slidesOffsetBefore: -100, centeredSlides: true, // centerInsufficientSlides: true, }, 992: { slidesPerView: 4, spaceBetween: 40, }, }, pagination: { el: ".channel22-swiper-pagination", clickable: true, }, }); // channel22Swiper.slideTo(2, 0, false); if (channel22Swiper.slides.length <= 4) { $(".channel22-swiper-pagination").hide(); $(".channel22-swiper").addClass("swiper-no-swiping"); } var channel23Swiper = new Swiper(".channel23-swiper", { observer: true, observeParents: true, spaceBetween: 40, loop: true, // height: 'auto', // slidesPerColumnFill: "row", // grid: { // fill: 'row', // rows: 2, // }, // slidesPerGroup: 3, speed: 1000, autoplay: { delay: 3000, stopOnLastSlide: true, disableOnInteraction: false, }, breakpoints: { 0: { slidesPerView: 1, // loop: true, // height: 36, spaceBetween: 60, // pagination: { // el: ".channel23-swiper-pagination", // type: "progressbar", // }, }, 992: { slidesPerView: 1, // slidesPerGroup: 5, }, }, pagination: { el: ".channel23-swiper-pagination", clickable: true, }, }); var channel23SwiperSlide = $(".channel23-swiper.hidden-lg-down .swiper-slide").length // console.log(channel23SwiperSlide) // if (windowWidth > 992) { // if (channel23SwiperSlide <= 1) { // $(".channel23-swiper-pagination").hide(); // $(".channel23-swiper").addClass("swiper-no-swiping"); // } // } else if (windowWidth < 992) { // if (channel23SwiperSlide <= 1) { // $(".channel23-swiper-pagination").hide(); // $(".channel23-swiper").addClass("swiper-no-swiping"); // } // } var channel23SwiperItem = $(".channel23 .channel23-swiper.hidden-lg-down .item").length var channel23SwiperItemMob = $(".channel23 .channel23-swiper.hidden-lg-up .item").length // console.log(channel23SwiperItem) if (windowWidth > 992) { // channel22Swiper.slideTo(1, 0, false); if (channel23SwiperItem <= 10) { $(".channel23-swiper.hidden-lg-down .channel23-swiper-pagination").hide() $(".channel23-swiper.hidden-lg-down").addClass("swiper-no-swiping"); } } else if (windowWidth < 992) { if (channel23SwiperItemMob <= 6) { $(".channel23-swiper.hidden-lg-up .channel23-swiper-pagination").hide() $(".channel23-swiper.hidden-lg-up").addClass("swiper-no-swiping"); } } // 浼佷笟鍏徃寮圭獥 $(".channel19 .more .box").on('click', function() { $(".company-pop.pc").show() // scrollStop() }) $(".company-close").on('click', function() { $(".company-pop").hide() scrollMove() }) $(".mob-company-pop-close").on('click', function() { $(".company-pop.mob").hide() scrollMove() }) // 缁勭粐寮规 if (windowWidth > 992) { $(".channel20 .more .box").on('click', function() { $(".org-pop").show() scrollStop() }) } if (windowWidth < 992) { $(".channel20 .more .box").on('click', function() { $(".company-pop.mob").show() // scrollStop() }) } $(".org-close").on('click', function() { $(".org-pop").hide() scrollMove() }) // 鑱旂郴鎴戜滑 $(".channel24 .more .box").on('click', function() { $(".org-pop").hide() $(".company-pop.mob").hide() $(".contact-pop").show() // scrollStop() }) $(".contact-close").on('click', function() { $(".contact-pop").hide() scrollMove() }) var channel28Swiper = new Swiper(".channel28-swiper", { observer: true, observeParents: true, breakpoints: { 0: { slidesPerView: 2, spaceBetween: 20, slidesPerGroup: 2, }, 992: { slidesPerView: 4, spaceBetween: 27, }, }, pagination: { el: ".channel28-swiper-pagination", clickable: true, }, }); var channel40Swiper = new Swiper(".channel40-swiper", { observer: true, observeParents: true, breakpoints: { 0: { slidesPerView: 1.2, spaceBetween: 20, // slidesPerGroup: 2, }, 992: { slidesPerView: 3, spaceBetween: 40, }, }, pagination: { el: ".channel40-swiper-pagination", clickable: true, }, }); if (winWt >= 992) { if (channel40Swiper.slides.length <= 3) { $(".channel40-swiper-pagination").hide(); $(".channel40-swiper").addClass("swiper-no-swiping"); } } $('.channel29 .top .item').on('click', function() { $(this).addClass('active').siblings().removeClass('active') $('.channel29 .channel29-swiper').eq($(this).index()).css('display', 'block').animate({ 'opacity': '1', 'display': 'block' }).siblings().css({ 'opacity': '0', 'display': 'none' }) }) var channel29Swiper1 = new Swiper(".channel29-swiper1", { observer: true, observeParents: true, breakpoints: { 0: { slidesPerView: 2, spaceBetween: 30, slidesPerGroup: 2, }, 992: { slidesPerView: 5, spaceBetween: 40, }, }, pagination: { el: ".channel29-swiper1-pagination", clickable: true, }, }); if (channel29Swiper1.slides.length <= 4) { $(".channel29-swiper1-pagination").hide(); $(".channel29-swiper1").addClass("swiper-no-swiping"); } var channel29Swiper2 = new Swiper(".channel29-swiper2", { observeParents: true, observer: true, breakpoints: { 0: { slidesPerView: 2, spaceBetween: 10, }, 992: { slidesPerView: 5, spaceBetween: 40, }, }, pagination: { el: ".channel29-swiper2-pagination", clickable: true, }, }); if ($(".channel29-swiper2 .item-slide").length <= 5) { $(".channel29-swiper2-pagination").hide(); $(".channel29-swiper2").addClass("swiper-no-swiping"); } var channel29Swiper3 = new Swiper(".channel29-swiper3", { observer: true, observeParents: true, breakpoints: { 0: { slidesPerView: 2, spaceBetween: 10, }, 992: { slidesPerView: 5, spaceBetween: 40, }, }, pagination: { el: ".channel29-swiper3-pagination", clickable: true, }, }); if ($(".channel29-swiper3 .item-slide").length <= 5) { $(".channel29-swiper3-pagination").hide(); $(".channel29-swiper3").addClass("swiper-no-swiping"); } // 娣诲姞wow $(window).on("load", function() { if (wow && !/msie [6|7|8|9]/i.test(navigator.userAgent)) { wow.init(); } }); // 鑻规灉鎵嬫満 // $(window).on('scroll', function() { // var scollTop = $(window).scrollTop(); //婊氬姩楂樺害 // // $(".header .scrllo span").html(scollTop) // if (scollTop < 0) { // $(".header").css('margin-top', '1rem') // } // if (scollTop > 0) { // $(".header").css('margin-top', '0rem') // } // }) //闃叉姈鍑芥暟 // let timeout // function debounce() { // //瀹氭椂鍣ㄥ彉閲忥紝鍏堟竻闄ゅ畾鏃跺櫒 // clearTimeout(timeout); // //瑙﹀彂浜嬩欢鎿嶄綔handler // timeout = setTimeout(handlerFunc, 300); // }; // function handlerFunc() { // // console.log('Success'); // var acindex = channel15Swiper1.activeIndex + 1 // channel15Swiper1.slideTo(acindex, 300, false); // } var swiper = new Swiper(".navitem5-list", { observer: true, observeParents: true, breakpoints: { 320: { slidesPerView: "auto", spaceBetween: "10%", }, 992: { slidesPerView: "auto", spaceBetween: 20, }, }, }); if (winWt >= 992) { $(".addsearch1").on("click", function(e) { e.stopPropagation(); $("body").toggleClass("pops") }) $(".addsearch1-1").on("click", function(e) { e.stopPropagation(); $("body").toggleClass("pops") }) $(".addsearch1-2").on("click", function(e) { $("body").removeClass("pops") }) $(".addsearch1-3").on("click", function(e) { $("body").removeClass("pops") }) $(".search-pop").on("click", function(e) { e.stopPropagation(); }) } if (winWt < 992) { $(".w-mob-search").on("click", function(e) { $("body").addClass("mob-pops") $(".addsearch-mob").show() }) $(".addsearch-mob .right .nolink").on("click", function(e) { $("body").removeClass("mob-pops") $(".addsearch-mob").hide() }) } $(".navitem5-list li").on(tap, function() { $(this) .addClass("active") .siblings() .removeClass("active"); }); // videojs("example_video_1").ready(function() { // var myPlayer = this; // myPlayer.play(); // }); // if ($(".global-paging1 .page-chose").length > 0) { // $("#page").on(tap, function(e) { // $('body').toggleClass('open-page') // e.stopPropagation(); // console.log(1111); // }); // } // $(document).on(tap, function() { // $('body').removeClass('open-page') // });