锘?/鍐呭鑺傜偣锛堣绐楋級锛屾嫋鎷夊潡锛堟嫋鍔ㄩ〉闈級锛屽唴瀹归〉闈紝瀵艰埅鍧楋紙鍦嗙偣鍧楋級,璋冭妭瑙嗙獥楂樺害 function pageSwitching(contentNode, childNode, pageNodes, navNode, heightAdjust) { var wWidth = 0, //鍐呭瀹 wHeight = 0, //鍐呭楂 on = 0, //褰撳墠椤 pageSize = $(pageNodes).length, //椤垫暟 _nodes = $(pageNodes), //椤靛潡 dataScroll = 0, //鏃堕棿鎴 text = ""; //椤靛鑸渾鐐 //杩斿洖娴忚鍣ㄥ function winWidth() { var winWidth = 0; if (window.innerWidth) winWidth = window.innerWidth; else if ((document.body) && (document.body.clientWidth)) winWidth = document.body.clientWidth; if (document.documentElement && document.documentElement.clientWidth) winWidth = document.documentElement.clientWidth; return winWidth; } //杩斿洖娴忚鍣ㄩ珮 function winHeight() { var winHeight = 0; if (window.innerHeight) winHeight = window.innerHeight; else if ((document.body) && (document.body.clientHeight)) winHeight = document.body.clientHeight; if (document.documentElement && document.documentElement.clientHeight) winHeight = document.documentElement.clientHeight; return winHeight; } //鍔ㄦ€佺敓鎴愬渾鐐 function navIcon() { for (var i = 0; i < pageSize; i++) { text += "" } $(navNode).html(text); }; //椤甸潰璺宠浆 function pageFun() { var marginTopValue = -wHeight * on; $(childNode).stop().animate({ top: marginTopValue }, 300); $(navNode).find("a").eq(on).addClass("current").siblings().removeClass("current"); }; //瑙嗙獥瀹介珮 function webSize() { wWidth = winWidth(); wHeight = winHeight() - heightAdjust; //鑺傜偣鍔ㄦ€侀檮楂樺 $(contentNode + "," + pageNodes).css({ "width": wWidth, "height": wHeight }); //绐楀彛鍙樺姩鏃惰繍琛屼竴娆 pageFun(); } //杩斿洖浼犲弬 function backValue(key) { let on=0; if(location.hash){ on=parseInt(location.hash.split(key + "=")[1]); } else if(location.href.includes("?"+key+"=")){ on=parseInt(location.href.split(key + "=")[1]); } return on; //return parseInt(location.hash.split(key + "=")[1]) ? parseInt(location.hash.split(key + "=")[1]) : 0; } //鐢熸垚鍦嗙偣 navIcon(); //椤甸潰鍒囨崲鍑芥暟 pageFun(); //绐楀彛楂樺鍒濆鍖 webSize(); //绐楀彛鍙樺姩瀹炴椂杩愯 $(window).resize(function() { webSize(); }); //瀹氫綅椤甸潰 on = backValue("page"); pageFun(); //瀵艰埅鍒囨崲椤甸潰 $(navNode).find("a").bind("click", function() { on = $(this).index(); pageFun(); }) $(".nav_aBlock").click(function() { if (!$(this).attr("href").includes(location.pathname)) { return; } on = $(this).index(); pageFun(); }) //婊氳疆鍒囨崲椤甸潰 $(document).bind('mousewheel', function(event, delta) { if (new Date().getTime() - dataScroll > 500) { if (delta > 0) { if (on > 0) { on -= 1; } } else { if (on < pageSize - 1) { on += 1; } } location.hash="#page="+on; pageFun(); dataScroll = new Date().getTime(); } return false; }); if (client.system.iphone || client.system.ipad || client.system.ipod || client.system.android || client.system.nokiaN || client.system.winMobile) { $(".common_page").css({ "width": "1100px" }); // $("body").mobileTouch({ // isPageScroll:false, // methods:[ // ["down",1], // ["up",1] // ], // downCallBack:function(){ // if(on > 0){ // on -= 1; // pageFun(); // } // }, // upCallBack:function(){ // if(on < pageSize-1){ // on += 1; // pageFun(); // } // } // }); } } $(function() { $("img.lazy").each(function() { var _this = $(this); _this.attr("src", $(this).data("src")); }) pageSwitching(".bodyer", ".common_parentBlock", ".common_page", ".navIcon_content", 110); }) $(function() { var tk = 0; function thisColumn() { $(".header_aBlock").eq(tk).addClass("current"); $(".header_aBlock").eq(tk).find(".header_Block").stop(true, true).animate({ marginTop: -17 }, 100); } $(".header_aBlock").hover(function() { $(this).addClass("maxZIndex").siblings().removeClass("maxZIndex"); $(this).find(".header_Block").stop(true, true).animate({ marginTop: -17 }, 200); $(this).find(".nav_contentBlock").stop(true, true).fadeIn(); }, function() { if (!$(this).hasClass("current")) { $(this).find(".header_Block").stop(true, true).animate({ marginTop: 0 }, 200); } $(this).find(".nav_contentBlock").css({ "display": "none" }); }); var hrefValue = window.location.href; var aboutUs = new RegExp("/aboutUs/"); var News = new RegExp("/News/"); var culture = new RegExp("/culture/"); var business = new RegExp("/business/"); var subsidiary = new RegExp("/subsidiary/"); var cooperation = new RegExp("/cooperation/"); if (aboutUs.test(hrefValue)) { tk = 1; thisColumn() } else if (News.test(hrefValue)) { tk = 2; thisColumn() } else if (culture.test(hrefValue)) { tk = 3; thisColumn() } else if (business.test(hrefValue)) { tk = 4; thisColumn() } else if (subsidiary.test(hrefValue)) { tk = 5; thisColumn() } else if (cooperation.test(hrefValue)) { tk = 6; thisColumn() } else { tk = 0; thisColumn() } $(".header_Block,.navIcon_content a,.header_logo").hover(function() { $(this).addClass("mouseover").removeClass("mouseout"); }, function() { $(this).addClass("mouseout").removeClass("mouseover"); }) var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?501c8333a65bfdbd8050eb93e2140f17"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); var cz = document.createElement("script"); cz.src = "//s4.cnzz.com/z_stat.php?id=1256723655&web_id=1256723655"; document.getElementsByTagName('body')[0].appendChild(cz); })