//椤堕儴瀵艰埅 fnheader(); /*椤甸潰婊氬姩澶撮儴鍔ㄧ敾*/ function fnheader() { $(window).scroll(function() { var currTop = $(window).scrollTop(); if (currTop < 35) { $('.header').removeClass('header-scroll'); } else { $('.header').addClass('header-scroll'); } }); if ($(window).scrollTop() > 0) { $('.header').addClass('header-scroll'); } } function meun_btn() { $(".meun-btn").toggleClass("meun-btn-open"); $(".mobile-nav-box").toggleClass("mobile-nav-box-show"); // $("html, body").toggleClass("height100"); $(".wrapper").toggleClass("wrapper-after-show"); } $(".mobile-meun-nav ul li .tit").click(function() { $(this).children("i").toggleClass("icon-angle-down").toggleClass("icon-angle-up").parents("li").siblings().find("i").removeClass("icon-angle-up").addClass("icon-angle-down"); $(this).next(".mobile-second-nav").slideToggle().parent().siblings().find(".mobile-second-nav").slideUp(); $(this).toggleClass("chose").parent().siblings().find(".tit").removeClass("chose"); }) // 棣栭〉浜у搧寮瑰嚭 $(function() { $('.imgSrcBox .prod_img').on('mouseover', function() { $(this).parent('.imgSrcBox').find('.prod-big-pic').show() }); $('.imgSrcBox .prod_img').on('mouseout', function() { $(this).parent('.imgSrcBox').find('.prod-big-pic').hide() }); $('.imgSrcBox .prod_img').on('click', function() { let p_link = $('this').html() //.attr('href-data') console.log(p_link); return; window.location.href = p_link; }) //澶氶〉闅愯棌 var num = $(".p_page").find("a.page_num").length; if (num == 1) { $(".p_page").addClass("hide"); } }) //椤堕儴鍏ㄥ眬鎼滅储 $(function(){ $('.e_search-20 .p_btn').on('click',function(){ window.location.href='http://' + window.location.host +'/globalSearch_1.html?keywords='+ $('.p_inputCon .p_input').val() +'&appIds=all'; }) }) //鍐呴〉鍒嗙被鏁堟灉 // 鑾峰彇 灞忓箷瀹藉害 var domWith = $(document).width(); // console.log(domWith); var href = location.pathname + location.search; // let href = $('.p_breadcrumbList .contentBox:last a').attr('href') //if (!href) return; $(".content .p_linkBox .yjLink").each(function(i, e) { var aa = $(e).attr("href"); if (aa == href) { // 鑷韩鏍峰紡 $(e).parents('li.p_linkBox').addClass('light') .end().siblings('li').removeClass('light'); } }); // 鐐瑰嚮涓€绾т笅鐨勫浘鏍 $('.yjTitle').on('click', function () { // 鑷韩鐨 鍥炬爣鏃嬭浆180搴 , // 鍚岀骇鐨 鍥炬爣鎭㈠鍘熸牱 , 浜岀骇 鏀惰捣; $(this).parent('li').addClass('active').siblings('li').removeClass('active') // 鑷韩鐨 浜岀骇灞曞紑 $(this).find('.iconfont1').toggleClass('rotate') .parents('li').siblings('li').find('.ejBox').slideUp().end().find('.iconfont1').removeClass('rotate').end() .end().find('.ejBox').stop().slideToggle(); }); if (domWith > 768) { // 涓夌骇鏄剧ず $('.ejLi').hover(function() { // 鍥炬爣 杞悜 $(this).find('.iconfont2').addClass('icf').end() .find('.sjBox').show(); }, function() { // 鍥炬爣澶嶅師 $(this).find('.iconfont2').removeClass('icf').end() .find('.sjBox').hide(); }) } else { // 绉诲姩绔 鐐瑰嚮鍑虹幇 $('.moveBtn').on('click', function() { // 鎸夐挳闅愯棌 $(this).css({ 'opacity': 0 }, 500) // 鍐呭婊戝嚭 $('.contentBox').animate({ "left": 0 }, 500) }) // 绉诲姩绔 鐐瑰嚮鏀跺洖 $('.backBtn').on('click', function() { // 鎸夐挳鏄剧ず $('.moveBtn').css({ 'opacity': 1 }, 500) // 鍐呭鏀跺洖 $('.contentBox').animate({ "left": "100%" }, 500) }) // 绉诲姩绔簩绾 鐐瑰嚮浜嬩欢 $('.iconfont2').on('click', function() { // 钃濈嚎鐨勬樉绀轰笌闅愯棌 $(this).siblings('.line_right').toggleClass('line_show'); // 鑷韩 涓夌骇涓嬫媺 ,鍏跺畠鐨勯殣钘 $(this).toggleClass('jsDeg') .parents('.ejLi').find('.sjBox').slideToggle().end() .siblings('.ejLi').find('.sjBox').slideUp() .end().find('.iconfont2').removeClass('jsDeg'); }) } //鍦ㄧ嚎瀹㈡湇 $(function() { $('.blacktop').click(function() { $('html , body').animate({ scrollTop: 0 }, 'slow'); }); $(".wyz-in:not(.wyz-search)").on("mouseenter", function() { $(this).addClass("cur").siblings(".wyz-in").removeClass("cur"); }).on("mouseleave", function() { $(this).removeClass("cur"); }); $(".cf-close").on("click", function() { $(this).parents(".wyz-search").removeClass("cur"); $(this).parents(".wyz-form").removeClass("cur"); }); $(".wyz-wx").on("mouseenter", function() { $(this).addClass("cur").siblings(".wyz-in").removeClass("cur"); setTimeout(function() { if ($(".wyz-wx").hasClass("cur")) { $(".wyz-qr-show").fadeIn("fast"); } }, 600); }).on("mouseleave", function() { $(this).removeClass("cur"); $(".wyz-qr-show").fadeOut("fast"); }); $(".wyz-dy").on("mouseenter", function() { $(this).addClass("cur").siblings(".wyz-in").removeClass("cur"); setTimeout(function() { if ($(".wyz-dy").hasClass("cur")) { $(".wyz-dy-show").fadeIn("fast"); } }, 600); }).on("mouseleave", function() { $(this).removeClass("cur"); $(".wyz-dy-show").fadeOut("fast"); }); $(window).on("load scroll", function() { var top = $(document).scrollTop(), wHeight = $(window).height(); if (top > wHeight) { $(".wyz-top").fadeIn("fast"); $(".wyz").css({ "height": 1 }); } else { $(".wyz-top").hide(); $(".wyz").removeAttr("style"); } }); $(".wyz-top").on("click", function() { $("html,body").stop().animate({ scrollTop: 0 }, 500); }); }) //婊氬姩浠g爜 var ms = $("#certify"); if (ms.length > 0) { certifySwiper = new Swiper('#certify .swiper-container', { watchSlidesProgress: true, slidesPerView: 'auto', centeredSlides: true, loop: true, loopedSlides: 3, autoplay: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', //clickable :true, }, 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) / 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) > 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); } } } }) } //鑽h獕寮圭獥 $(document).ready(function() { $('#c_static_001-1640681729466 .p_loopitem').on('click', '.cbox-6-0', function() { let img_src = $(this).find('img').attr("src") let img_name = $(this).find('.e_text-5').text() console.log(img_name) $('.pro-swiper-box').addClass('show-swiper'); $('.pro-swiper-box .proImg-pc').attr('src', img_src); $(".proLink-swiper").text(img_name) var list_index = $(this).index() + 1; }); $('.close-box').on('click', function() { $('.pro-swiper-box').removeClass('show-swiper'); }); $('.pro-swiper-box').on('click', function() { $('.pro-swiper-box').removeClass('show-swiper'); }); }); $(function() { if (isFrontEnv()) { //闈㈠寘灞戣ˉ涓 $('.p_breadcrumb .p_breadcrumbItem').each(() => { let a = $(this).find('a').attr('href'); if (a == 'undefined') { $(this).hide() } }) //鏂囧瓧鎵撴暎 $("#c_static_001-1645253205640 .e_text-2").each(function() { $(this).html("" + $(this).text().trim().split("").join("") + ""); $(this).find("span").each(function() { if (Math.random() > 0.5) { $(this).css("transition-delay", Math.random() + "s"); } }); }); //鍥剧墖鑻辨枃title let entitle = $('.header.logo a').attr('title') $("body").find('img').each(function() { $(this).attr('title', entitle); }); } });