(function($, window, document) { $(function() { //搴曢儴瑙e喅鏂规鍜宐anner绗竴涓猧tem娣诲姞active $(".solution-style .item:first-child").addClass("active"); $("#btm-banner-item .carousel-inner .item:first-child").addClass("active"); /*椤堕儴banner*/ var mySwiper = new Swiper('.r-banner .swiper-container', { pagination: '.r-banner .swiper-pagination', autoplay : 5000, paginationClickable: true, nextButton: '.r-banner .swiper-button-next', prevButton: '.r-banner .swiper-button-prev', loop : true,//鍙€夐€夐」锛屽紑鍚惊鐜 calculateHeight : true, resizeReInit : true, autoplayDisableOnInteraction : false }); $('.r-banner .swiper-button-prev').click(function() { mySwiper.swipePrev(); }) $('.r-banner .swiper-button-next').click(function() { mySwiper.swipeNext(); }) /*搴曢儴杞挱鍥?/ var btmbanner = new Swiper('#btm-banner-item.swiper-container', { pagination: '#btm-banner-item .swiper-pagination', autoplay : 5000, paginationClickable: true, loop : true,//鍙€夐€夐」锛屽紑鍚惊鐜 calculateHeight : true, resizeReInit : true, autoplayDisableOnInteraction : false }); /*瑙e喅鏂规杞挱鍥?/ // $('#the-solution-mobilescreen').carousel({ // interval: 3000 // }); /*浜у搧涓績 */ $(".r-product .product-tab li .list-open").click(function(){ $(".list-open").removeClass("list-ooff"); $(".list-close").removeClass("list-oon").addClass("list-ooff"); $(this).parents("li").addClass("on").siblings("li").removeClass("on"); var top = $(this).parent("li").offset().top -58; $('html,body').animate({scrollTop:top}); $(this).addClass("list-ooff"); $(this).parents("li").children(".list-close").addClass("list-oon").removeClass("list-ooff"); }); $(".r-product .product-tab li .list-close").click(function(){ $(this).parents("li").removeClass("on"); $(this).addClass("list-ooff"); $(this).parents("li").children(".list-open").addClass("list-oon").removeClass("list-ooff"); }); if($(window).innerWidth()<1025){ $(".r-product .product-tab li").unbind("mouseenter mouseleave"); /*$("")*/ } $(window).resize(function(){ if($(window).innerWidth()<1025){ $(".r-product .product-tab li").unbind("mouseenter mouseleave"); } else{ $(".r-product .product-tab li").mouseenter(function(){ $(this).addClass("on").siblings("li").removeClass("on"); }) $(".r-product .product-tab li").mouseleave(function(){ $(this).removeClass("on"); }) } }); //zuixindongtai var initFeatureSwiper = function () { var pSwiper; if ($(window).innerWidth() > 785) { // mySwiper1 = new Swiper('.recent-news .swiper-container', { // pagination: '.recent-news .swiper-pagination', // paginationClickable: true, // // autoplay : 3000, // calculateHeight : true, // resizeReInit : true, // autoplayDisableOnInteraction : false // }); pSwiper = new Swiper('.recent-news .swiper-container', { slidesPerView: 3, slidesPerGroup: 3, autoplay: 3000, // paginationClickable: true, // nextButton: '.switch-case .common-swiper .swiper-button-next', // prevButton: '.switch-case .common-swiper .swiper-button-prev', // loop: true,//鍙€夐€夐」锛屽紑鍚惊鐜 calculateHeight: true, resizeReInit: true, autoplayDisableOnInteraction : false }); } else { pSwiper = new Swiper('.recent-news .swiper-container', { pagination: '.recent-news .swiper-pagination', autoplay: 3000, paginationClickable: true, // nextButton: '.switch-case .common-swiper .swiper-button-next', // prevButton: '.switch-case .common-swiper .swiper-button-prev', loop: true,//鍙€夐€夐」锛屽紑鍚惊鐜 calculateHeight: true, resizeReInit: true, autoplayDisableOnInteraction : false }); } } initFeatureSwiper(); /*瑙e喅鏂规*/ var solutionSwiper ; if ($(window).innerWidth() > 785) { //if($(".news-list > div:first-child").hasClass('swiper-wrapper')){ $("#the-solution-mobilescreen").removeClass("swiper-container"); $("#the-solution-mobilescreen > div:first-child").removeClass("swiper-wrapper"); $("#the-solution-mobilescreen > div:first-child").attr("style",""); $("#the-solution-mobilescreen > div .sool-mb-view").attr("class",'sool-mb-view'); $("#the-solution-mobilescreen > div .sool-mb-view").attr("style",""); //}else{ //} //瑙e喅鏂规 if($(".solution-style").hasClass('the-solution-banner')){ $(".solution-style").removeClass("the-solution-banner").addClass("the-solution-box"); }else{ $(".solution-style").addClass("the-solution-box"); } $(".sol-content .sol-mb-view").addClass("the-solution-boxcontent"); }else{ if($("#the-solution-mobilescreen > div:first-child").hasClass('swiper-wrapper')){ }else{ $("#the-solution-mobilescreen").addClass("swiper-container"); $("#the-solution-mobilescreen > div:first-child").addClass("swiper-wrapper"); $("#the-solution-mobilescreen > div .sool-mb-view").addClass("swiper-slide"); } /** 瑙e喅鏂规 **/ if($(".solution-style").hasClass('the-solution-box')){ $(".solution-style").removeClass("the-solution-box").addClass("the-solution-banner"); }else{ $(".solution-style").addClass("the-solution-banner"); } $(".sol-content .sol-mb-view").removeClass("the-solution-boxcontent"); solutionSwiper = new Swiper('#the-solution-mobilescreen.swiper-container', { pagination: '#the-solution-mobilescreen .swiper-pagination', paginationClickable: true, autoplay : 3000, calculateHeight : true, resizeReInit : true, autoplayDisableOnInteraction : false }); //mySwiper1.reInit(); } $(window).resize(function() { //瑙e喅鏂规 if ($(window).innerWidth() > 785) { if($("#the-solution-mobilescreen > div:first-child").hasClass('swiper-wrapper')){ $("#the-solution-mobilescreen").removeClass("swiper-container"); $("#the-solution-mobilescreen > div:first-child").removeClass("swiper-wrapper"); $("#the-solution-mobilescreen > div:first-child").attr("style",""); $("#the-solution-mobilescreen > div:first-child").css("height","auto!important"); $("#the-solution-mobilescreen > div .sool-mb-view").removeClass("swiper-slide"); $("#the-solution-mobilescreen > div .sool-mb-view").attr("style",""); } //瑙e喅鏂规 if($(".solution-style").hasClass('the-solution-banner')){ $(".solution-style").removeClass("the-solution-banner").addClass("the-solution-box"); }else{ $(".solution-style").addClass("the-solution-box"); } $(".sol-content .sol-mb-view").addClass("the-solution-boxcontent"); }else{ if($("#the-solution-mobilescreen > div:first-child").hasClass('swiper-wrapper')){ //mySwiper1.reInit(); }else{ $("#the-solution-mobilescreen").addClass("swiper-container"); $("#the-solution-mobilescreen > div:first-child").addClass("swiper-wrapper"); $("#the-solution-mobilescreen > div .sool-mb-view").addClass("swiper-slide"); //mySwiper1.reInit(); } /** 瑙e喅鏂规 **/ if($(".solution-style").hasClass('the-solution-box')){ $(".solution-style").removeClass("the-solution-box").addClass("the-solution-banner"); }else{ $(".solution-style").addClass("the-solution-banner"); } $(".sol-content .sol-mb-view").removeClass("the-solution-boxcontent"); solutionSwiper = new Swiper('#the-solution-mobilescreen .swiper-container', { pagination: '#the-solution-mobilescreen .swiper-pagination', paginationClickable: true, autoplay : 3000, calculateHeight : true, resizeReInit : true, autoplayDisableOnInteraction : false }); } }); //ie8 var userAgent = navigator.userAgent; if(window.showModalDialog && userAgent.indexOf("Safari") <= -1) { var width = $(window).width(); if(width >= 786) { $(".news-list .mb-view:nth-child(n+2)").css('margin-left','1.25%'); } $(".r-product .product-list:first-child").css("position", "absolute") $(".r-product .product-list:first-child").css("top", "0"); $(".r-product .product-list:first-child").css("left", "0"); $(".r-product .product-list:first-child").css('width',"370px"); $(".r-product .product-list:first-child").css('height',"650px"); $(".r-product .product-list:nth-child(2)").css("position", "absolute"); $(".r-product .product-list:nth-child(2)").css( "top", "0"); $(".r-product .product-list:nth-child(2)").css( "left", "370px"); $('.r-product .product-list:nth-child(2)').css('width','630px'); $(".r-product .product-list:nth-child(3)").css("position", "absolute"); $(".r-product .product-list:nth-child(3)").css( "top", "335px"); $(".r-product .product-list:nth-child(3)").css( "left", "370px"); $('.r-product .product-list:nth-child(3)').css('width','630px'); $(".r-product .product-list:first-child .pro-style").css("top","55%;") $(".r-product .product-list:nth-child(2) .pro-style").css("text-align", "left"); $(".r-product .product-list:nth-child(2) .pro-style").css("top", "25%"); $(".r-product .product-list:nth-child(2) .pro-style").css("left", "70%"); $(".r-product .product-list:nth-child(3) .pro-style").css("top", "20%"); $(".r-product .product-list:nth-child(3) .pro-style").css("left", "6%"); $(".r-product .product-list:nth-child(3) .pro-style").css('margin','0'); $(".r-product .product-list:nth-child(3) .pro-style").css('text-align','left'); if( width > 1024 && width < 1200){ $('.r-product .product-list:first-child').css('width','37%'); $(".r-product .product-list:first-child").css('height',"645px"); $('.r-product .product-list:first-child').css('overflow','hidden'); $('.r-product .product-list:nth-child(2)').css('left','37%'); $('.r-product .product-list:nth-child(2)').css('width','60%'); $('.r-product .product-list:nth-child(2)').css('overflow','hidden'); $('.r-product .product-list:nth-child(3)').css('top','322.5px'); $('.r-product .product-list:nth-child(3)').css('left','37%'); $('.r-product .product-list:nth-child(3)').css('width','60%'); $(".r-product .product-list:nth-child(2) .pro-style").css("text-align", "left"); $(".r-product .product-list:nth-child(2) .pro-style").css("top", "25%"); $(".r-product .product-list:nth-child(2) .pro-style").css("left", "70%"); $(".r-product .product-list:nth-child(3) .pro-style").css("top", "20%"); $(".r-product .product-list:nth-child(3) .pro-style").css("left", "6%"); $(".r-product .product-list:nth-child(3) .pro-style").css('margin','0'); //$('.r-product .product-list:first-child a').css('display','block'); $(".r-product .product-list:nth-child(2) img").css("height",'322.5px'); $(".r-product .product-list:nth-child(3) img").css("height",'322.5px') }else{ $(".r-product .product-list:first-child").css("position", "absolute") $(".r-product .product-list:first-child").css("top", "0"); $(".r-product .product-list:first-child").css("left", "0"); $(".r-product .product-list:first-child").css('width',"370px"); $(".r-product .product-list:first-child").css('height',"650px"); $(".r-product .product-list:nth-child(2)").css("position", "absolute"); $(".r-product .product-list:nth-child(2)").css( "top", "0"); $(".r-product .product-list:nth-child(2)").css( "left", "370px"); $(".r-product .product-list:nth-child(3)").css("position", "absolute"); $(".r-product .product-list:nth-child(3)").css( "top", "335px"); $(".r-product .product-list:nth-child(3)").css( "left", "370px"); $(".r-product .product-list:first-child .pro-style").css("top","55%;") $(".r-product .product-list:nth-child(2) .pro-style").css("text-align", "left"); $(".r-product .product-list:nth-child(2) .pro-style").css("top", "25%"); $(".r-product .product-list:nth-child(2) .pro-style").css("left", "70%"); $(".r-product .product-list:nth-child(3) .pro-style").css("top", "20%"); $(".r-product .product-list:nth-child(3) .pro-style").css("left", "6%"); $(".r-product .product-list:nth-child(3) .pro-style").css('margin','0'); $(".r-product .product-list:nth-child(3) .pro-style").css('text-align','left'); } $(".the-solution-box .sool-mb-view:nth-child(2)").css( "margin-left","3%"); if(width <= 1650) { $(".r-banner .swiper-button-prev").css("left","4%"); $(".r-banner .swiper-button-next").css("right","4%"); } if(width <= 1500) { $('.btm-banner-title').css("font-size","46px"); $('.btm-banner-des').css("font-size","28px"); // $(".r-product .product-center .right").css("width","auto"); // $(".r-product .product-list img").css("display","block"); // $(".r-product .product-list img").css("max-width","100%"); $(".r-product .product-list img").css("width","100%"); // $(".r-product .product-list img").css("height","100%"); $(".r-product .product-list:first-child img").css("height",'100%'); } if(width <= 1440) { $(".r-banner .com-content").css("width","auto"); $(".r-banner .com-content").css("margin-left","0"); $(".r-banner .com-content").css("left","10%"); } if(width <= 1280) { $('.com-content').css("padding","0 2%"); $('.btm-banner-title').css("font-size","37px"); $('.btm-banner-des').css("font-size","25px"); $('.btm-banner .carousel-indicators li').css("width","12px"); $('.btm-banner .carousel-indicators li').css("height","12px"); $('.btm-banner .carousel-indicators .active').css("width","13px"); $('.btm-banner .carousel-indicators .active').css("height","13px"); $('.btm-banner .carousel-indicators .active').css("border-radius","7px"); $('.news-list-title').css("font-size","26px"); } if(width <= 1220) { $('.r-banner-link .lk-item').css("padding","0 30px"); } if( width > 1024 && width < 1200){ $('.r-product .product-center').css("width","100%"); $('.r-product .product-center').css("padding","0 2%"); $('.r-product .product-center .right').css("left","205px"); $('.r-product .r-product-content .com-content').css("width","1025px"); $('.r-product .layout-lr .left').css("height","645.48px"); $('.r-product .product-tab-erji').css("height","645.48px"); $('.r-product .product-center .left .product-tab li>a').css("line-height","53px"); // $('.r-product .product-tab-erji').css("width","70%"); $('.r-product .product-tab-erji').css("left","180px"); //$(".r-product .product-list:nth-child(2) .pro-style").css("left", "70%"); } } }); })(jQuery, window, document); /*浜у搧涓績*/ function listOpen() { $(".list-open").parents("li").addClass("on"); $(".list-open").addClass("list-ooff") $(".list-close").addClass("list-oon") $(".list-close").removeClass("list-ooff") } function listClose() { $(".list-close").parents("li").removeClass("on"); $(".list-close").addClass("list-ooff") $(".list-open").addClass("list-oon") $(".list-open").removeClass("list-ooff") }