/* Js for http://www.baidu.com, Version=1778751008 */ if(typeof(v) != "object") v = {};v.path = [25];;v.categoryID = 25;;v.pageLayout = "global";;place96fec73179a0b8ebb93a277a07056005='IDLIST_PLACEHOLDER114,113,112,111,110,109,108,107,106,105,IDLIST_PLACEHOLDER';;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function() { $('#copyBox').hide().find(':input').attr('disabled', true); $('#source').change(function() { $('#copyBox').hide().find(':input').attr('disabled', true); if($(this).val() != 'original') $('#copyBox').show().find(':input').attr('disabled', false); }); /* Set current active topNav. */ var hasActive = false; if(v.categoryID > 0 && $('.nav-article-' + v.categoryID).length >= 1) { hasActive = true; $('.nav-article-' + v.categoryID).addClass('active'); } if(v.categoryPath && v.categoryPath.length) { $.each(v.categoryPath, function(index, category) { if(!hasActive) { if($('.nav-article-' + category).length >= 1) hasActive = true; $('.nav-article-' + category).addClass('active'); } }); } else if(v.path && v.path.length) { $.each(v.path, function(index, category) { if(!hasActive) { if($('.nav-article-' + category).length >= 1) hasActive = true; $('.nav-article-' + category).addClass('active'); } }); if(!hasActive) $('.nav-article-0').addClass('active'); } if(v.categoryID !== 0) $('#category' + v.categoryID).parent().addClass('active'); }); $(document).ready(function() { var fieldName = 'addedDate'; var orderType = 'desc'; $(document).on('click', '.setOrder', function() { if($(this).data('field') == fieldName) { orderType = orderType == 'asc' ? 'desc' : 'asc'; fieldName = $(this).data('field'); } else { orderType = 'desc'; fieldName = $(this).data('field'); } $.cookie('articleOrderBy[' + v.categoryID + ']', fieldName + '_' + orderType); r = Math.ceil(Math.random() * 1000000); url = location.href; url = url.indexOf('r=') != -1 ? url.substring(0, url.indexOf('r=') - 1) : url; if(config.requestType == 'GET' && url.indexOf('pageID') < 0) url = url + '&pageID=1'; url = config.requestType == 'GET' ? url + '&r=' + r + ' #articleList' : url + '?r=' + r + ' #articleList'; $('#mainContainer').load(url, function() { setSorterClass() $('.pager > a').each(function() { href = $(this).attr('href'); if(href.indexOf('r=') < 0) return true; $(this).attr('href', href.substring(0, href.indexOf('r=') - 1)); }); }); }); function setSorterClass() { if(orderType == 'asc') { $("[data-field=" + fieldName + "]").parent().removeClass('header').addClass('headerSortUp'); } if(orderType == 'desc') { $("[data-field=" + fieldName + "]").parent().removeClass('header').addClass('headerSortDown'); } } }); /*修改logo */ document.getElementById("siteLogo").innerHTML=""; /*判断是否登录账号 登陆后可查看模块 */ var YJZS=document.querySelector("#navbar .nav .nav-article-25 a"), Ali=document.querySelectorAll("#navbar .nav li"), Vip=document.querySelector("#siteNav a:nth-child(1)"); var login=Vip.innerHTML; YJZS.onclick=function(){ if(login==="登录"){ window.location.href="/user-login.html"; return false; } } /*if(login!=="登录"){ Ali[6].style.display="block"; }*/var artNav=document.querySelector(".page-content .breadcrumb"); artNav.innerHTML="
  • 经营革新资料
  • "+ "
  • 革新活动资料
  • "+ "
  • 学习与成长
  • "+ "
  • 企业内部资料
  • "; var url = window.location.href; /*第一栏菜单提醒 active*/ $(".page-content .breadcrumb a").each(function () { if (returnUrl($(this).attr("href")) == returnUrl(url)) { $(this).addClass("active"); } }); //以下为截取url的方法 function returnUrl(href) { var number = href.lastIndexOf("/"); return href.substring(number + 1); } var artList=document.getElementById("articleHeader"); switch(returnUrl(url)) { /*烨嘉知识*/ case "c25.html": artList.innerHTML=""; break; /*经营革新资料*/ case "c33.html": artList.innerHTML=""; break; /*革新活动资料*/ case "c34.html": artList.innerHTML=""; break; case "c36.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(2) a").addClass("active"); break; case "c37.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(2) a").addClass("active"); break; case "c38.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(2) a").addClass("active"); break; case "c39.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(2) a").addClass("active"); break; /*学习与成长*/ case "c35.html": artList.innerHTML=""; break; case "c40.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(3) a").addClass("active"); break; case "c41.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(3) a").addClass("active"); break; /*企业内部资料*/ case "c46.html": artList.innerHTML=""; break; case "c47.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(4) a").addClass("active"); break; case "c48.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(4) a").addClass("active"); break; case "c49.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(4) a").addClass("active"); break; case "c51.html": artList.innerHTML=""; $(".page-content .breadcrumb li:nth-child(4) a").addClass("active"); break; } /*第二栏菜单提醒 active*/ $("#articleHeader li a").each(function () { if (returnUrl($(this).attr("href")) == returnUrl(url)) { $(this).addClass("active"); } }); //以下为截取url的方法 function returnUrl(href) { var number = href.lastIndexOf("/"); return href.substring(number + 1); }