// IE10浠ヤ笅娴忚鍣ㄦ彁绀 function hiUpgrade() { window.AESKey = ''; // 鍒ゆ柇娴忚鍣ㄦ槸鍚︽敮鎸乸laceholder灞炴€ function isSupportPlaceholder() { var input = document.createElement('input'); return 'placeholder' in input; }; //鍒ゆ柇鏄惁鏄疘E娴忚鍣紝鍖呮嫭Edge娴忚鍣 function IEVersion() { //鍙栧緱娴忚鍣ㄧ殑userAgent瀛楃涓 var userAgent = navigator.userAgent; //鍒ゆ柇鏄惁IE娴忚鍣 var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1; if (isIE) { // ie10鍙婁互涓 var reIE = new RegExp("MSIE (\\d+\\.\\d+);"); reIE.test(userAgent); var fIEVersion = parseFloat(RegExp["$1"]); if (fIEVersion < 10 || !isSupportPlaceholder()) { return true; } } else { return false; } } var tpl = '

鏃犳硶姝e父娴忚鏈綉绔欙紒

缁х画娴忚

1銆佹偍鐨勬祻瑙堝櫒鐗堟湰杩囦綆锛岃鍗囩骇鎮ㄧ殑娴忚鍣ㄣ€侟/p>

2銆佸鏋滄偍鐨勬祻瑙堝櫒鏄渶鏂扮増鏈紝璇饵span>鍒囨崲鍒版瀬閫熸ā寮廃/span>璁块棶銆侟/p>

3銆佹偍浣跨敤鐨勬槸IE10浠ヤ笅鐨勬祻瑙堝櫒锛屽缓璁偍浣跨敤涓绘祦娴忚鍣?/span>璁块棶銆侟/p>

涓绘祦娴忚鍣ㄤ笅杞键/span>

'; if (IEVersion()) { document.write(tpl); } } hiUpgrade(); // 瀵艰埅 function headNav() { var oBody = $("body"); var oHead = $("#c-header"); var oNav = $("#c-header .c-nav"); var oBtn = $("#c-header .c-switch"); var oL = $("#c-header .c-nav>li"); var oTitle = $("#c-header .c-nav2 li .c-title-box"); var num = 0; var i = 0; var oP = $("#c-placeholder"); var b = true; var t = null; // 绐楀彛閲嶇疆闅愯棌鎵嬫満绔鑸 $(window).resize(function() { console.log(11) if ($(window).width()>991) { oBody.removeClass('c-open'); } }); // 鎵嬫満绔鑸爮鐩笅鎷 oTitle.click(function() { $(this).next().stop().slideToggle(); }); // 榧犳爣绉诲叆瀵艰埅鏍峰紡 oHead.hover(function() { $(this).addClass("c-style2"); }, function() { if ($(window).scrollTop() <= oHead.outerHeight() && oP.length == 0 && !oBody.hasClass("c-open")) { oHead.removeClass("c-style2"); } else if ($(window).scrollTop() > oHead.outerHeight()) { oHead.addClass("c-style2"); } else if ($(window).scrollTop() <= oHead.outerHeight() && oP.length != 0) { oHead.addClass("c-style2"); } }); // 鎵嬫満绔鑸樉绀 oBtn.click(function() { if (b) { b = false; // t = $(window).scrollTop(); oBody.addClass('c-open'); // oBody.css("top", -t); } else { b = true; oBody.removeClass('c-open'); // oBody.css("top", "0"); // $(window).scrollTop(t); } }); // 瀵艰埅鏄剧ず鍙婃牱寮 function fn1() { if ($(window).scrollTop() - i > 0 && $(window).scrollTop() > oHead.outerHeight() && !oBody.hasClass("c-open")) { i = $(window).scrollTop(); oHead.addClass("c-head-move"); oHead.addClass("c-style2"); } else if ($(window).scrollTop() - i <= 0) { i = $(window).scrollTop(); oHead.removeClass("c-head-move"); if ($(window).scrollTop() <= oHead.outerHeight() && oP.length == 0 && !oBody.hasClass("c-open")) { oHead.removeClass("c-style2"); } else if ($(window).scrollTop() > oHead.outerHeight()) { oHead.addClass("c-style2"); } else if ($(window).scrollTop() <= oHead.outerHeight() && oP.length != 0) { oHead.addClass("c-style2"); } } } fn1(); $(window).scroll(function() { fn1(); }); // pc瀵艰埅鍔ㄧ敾 oL.each(function() { if ($(this).hasClass("on")) { num = $(this).index(); } $(this).hover(function() { oL.eq(num).removeClass("on"); $(this).children("ul").stop().slideDown(); }, function() { oL.eq(num).addClass("on"); $(this).children("ul").stop().slideUp(); }); }); } headNav(); // 椤堕儴鎼滅储 function headSearch() { var obj = $("#c-header form"); var oBox = obj.find(".c-box"); obj.hover(function() { oBox.stop().fadeIn(); }, function() { oBox.stop().fadeOut(); }); obj.submit(function(){ if(!$(this).find("input").val()){ layer.msg('璇疯緭鍏ユ悳绱㈢殑鍏抽敭璇嶏紒', { icon: 7 }); return false; } }); } headSearch(); // 棣栭〉杞挱 function homeBanner() { var swiper = new Swiper(".c-home-banner", { // effect : 'fade', loop: true, speed: 1000, autoplay: { delay: 3000, disableOnInteraction: false, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination', clickable: true, }, // breakpoints: { // 767: { // slidesPerView: 3, // spaceBetween: 20, // } // } }); // 璁剧疆鍏ㄥ睆 HiSetClientHeight($(".c-home-banner .swiper-slide img")); } homeBanner(); // 鍙鍖栨暟鎹粴鍔 function visualData(obj) { $(window).load(function() { obj.each(function() { var h = Number($(this).html()); var t = ""; var n = Math.ceil(h / 20); var a = true; var This = $(this); if ($(this).length != 0) { t = $(this).offset().top; } This.html(0); fn1(); $(window).scroll(function() { fn1(); }); function fn1() { var wT = $(window).scrollTop(); if (wT > t - $(window).height() + 50 && wT < t - 50 && a == true) { a = false; var y = 0; var timer2 = setInterval(function() { if (y >= h) { y = h; clearInterval(timer2); } This.html(y); y += n; }, 100); } } }); }); } visualData($(".c-num-move")); // 渚ц竟鏍忓洖鍒伴《閮 function goTop() { var obj = $("#c-go-top"); var oBtn = $("#c-go-top"); oBtn.click(function() { $("html,body").animate({ scrollTop: 0 }, 500); }); function fn1() { if ($(window).scrollTop() > $(window).height()) { obj.fadeIn(); } else { obj.fadeOut(); } } fn1(); $(window).scroll(function() { fn1(); }); } goTop(); // 搴曢儴瀵艰埅 function footerNav() { var aList = $("#c-footer .c-list-box"); aList.each(function() { var This = $(this); $(this).find(".c-title-box").click(function() { if ($(window).width() < 768) { This.toggleClass("on"); This.find(".c-list").stop().slideToggle(); } }); }); } footerNav(); // 浜岀淮鐮佸脊绐 function codePop() { var b = $("#c-footer .c-code-btn"); var w = $("#c-code-pop"); var c = w.find(".c-close"); var d = w.find(".c-img-box"); var oImg = w.find(".c-img-box>img"); b.click(function() { oImg.attr("src",$(this).data("img-src")); w.stop().fadeToggle(); }); d.click(function() { return false; }); w.click(function() { w.stop().fadeToggle(); }); c.click(function() { w.stop().fadeToggle(); }); } codePop(); // ----鏈珯 // 閫氳繃婊氬姩鍒ゆ柇head鐘舵€ function fn1() { if ($(window).scrollTop() > 1) { $('.header').addClass('fh'); } else { $('.header').removeClass('fh'); } } fn1(); $(window).scroll(function () { fn1(); }) if($(window).width() < 1260){ $('.header .close').on('click',function(){ $(this).toggleClass('on'); $('.header .right').stop().slideToggle(); }) $(".header .right .menu ul li .menu-link").click(function(e){ if($(this).parents("li").find("ul li").length!=0){ var e = e || event; e.preventDefault(); $(this).parents("li").children("ul").stop().slideToggle().parents("li").siblings().children("ul").stop().slideUp(); $(this).parents("li").toggleClass("active1").siblings().removeClass("active1"); } }); $(".header .right .menu ul li ul li a").each(function(){ if($(this).parent().children("ul").length){ $(this).click(function(e){ e.preventDefault(); $(this).parent().toggleClass("on1"); $(this).parent().children("ul").stop().slideToggle(); }); } }); } $(".header .right .menu ul li .menu-link").click(function(e){ if($(this).parents("li").find("ul li").length!=0){ var e = e || event; // e.preventDefault(); } }); function setCookie(cname,cvalue,exdays){ if(exdays){ var d = new Date(); d.setTime(d.getTime()+(exdays*24*60*60*1000)); var expires = "expires="+d.toGMTString(); document.cookie = cname+"="+cvalue+"; "+expires; }else{ document.cookie = cname+"="+cvalue+";"; } } function getCookie(cname){ var name = cname + "="; var ca = document.cookie.split(';'); for(var i=0; i= 1){ $("#c-risk-warning").hide(); }else{ $("#c-risk-warning").slideDown(); } $("#c-risk-warning .c-close").click(function(){ var _zhi = getCookie("cokit"); if(_zhi && getCookie("cokit") > 1){ _zhi=1; } Number(_zhi); _zhi++; setCookie("cokit",_zhi,7); $("#c-risk-warning").slideUp(); }); // 鏂板 $('.home-sec1 .container .cont .item .list .text').matchHeight(); $(".home-sec1 .container .cont .item").hover(function(){ $(this).addClass("on").siblings().removeClass("on"); });