// IE10以下浏览器提示 function hiUpgrade() { window.AESKey = ''; // 判断浏览器是否支持placeholder属性 function isSupportPlaceholder() { var input = document.createElement('input'); return 'placeholder' in input; }; //判断是否是IE浏览器,包括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 = '

无法正常浏览本网站!

继续浏览

1、您的浏览器版本过低,请升级您的浏览器。

2、如果您的浏览器是最新版本,请切换到极速模式访问。

3、您使用的是IE10以下的浏览器,建议您使用主流浏览器访问。

主流浏览器下载

'; 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"); });