var keynav = "57789365-f8f1-4f01-8fbb-47466e4359ba"; $.request = function (name) { var search = location.search.slice(1); var arr = search.split("&"); for (var i = 0; i < arr.length; i++) { var ar = arr[i].split("="); if (ar[0] == name) { if (unescape(ar[1]) == 'undefined') { return ""; } else { return unescape(ar[1]); } } } return ""; } var clients = []; $(function () { clients = $.clientsinit(); }) $.clientsinit = function () { var datajson = { dataitems: [], }; var init = function () { $.ajax({ url: "/web/getclientsdatajson", type: "get", datatype: "json", async: false, success: function (data) { datajson.siteinfo = data.siteinfo; datajson.navinfo = data.navinfo; } }); } init(); return datajson; } function getloadnav() { var datanavinfo = top.clients.navinfo; var _html = ""; $.each(datanavinfo, function (i) { var row = datanavinfo[i]; if (row.taxiscode == "home") { _html += '
  • '; } else { _html += '
  • '; } _html += ' ' + row.taxisname + ''; _html += '
  • '; }); $("#nvahead").prepend(_html); if (!!keynav) { $("#nvahead li").removeclass("active"); $('#nvahead .scroll').each(function () { if ($(this).data('id') == keynav) { $(this).addclass("active"); return false; } }); } } function getsiteinfo() { var datasite = top.clients.siteinfo; var sitelogo = ""; var sitecopyright = ""; var sitewebsiterecord = ""; var sitestatisticalscript = ""; $.each(datasite, function (i) { var row = datasite[i]; sitelogo = row.sitelogo; sitecopyright = row.sitecopyright; sitewebsiterecord = row.sitewebsiterecord; sitestatisticalscript = row.sitestatisticalscript; }); var date = new date; if (!!sitelogo) { $("#logo").attr("src", sitelogo); } //$("#copyright").prepend("
    copyright © 2008-" + date.getfullyear()+"  " + sitecopyright + "   " + sitewebsiterecord+"
    "); //var beianxinxi = '

    滇公网安备 53011202000983号

    '; //$("#copyright").prepend(beianxinxi); if (!!sitestatisticalscript) { $("body").prepend(sitestatisticalscript); } } function getbottomnav() { $.ajax({ url: "/web/getlistbychildnav", data: { parentid: "8ca4b4cc-86dc-4e5c-9384-46a4bbdbb31c" }, datatype: "json", async: false, success: function (data) { var _html = ""; for (var i = 0; i < data.length; i++) { var row = data[i]; _html += '
  • '; _html += ' ' + row.name + ''; //_html += ' ' + row.name + ''; _html += '
  • '; } $("#bottomabout").prepend(_html); } }); $.ajax({ url: "/web/getlistbychildnav", data: { parentid: "ddd4aec5-3570-46e2-9ad6-7456c89ad428" }, datatype: "json", async: false, success: function (data) { var _html = ""; for (var i = 0; i < data.length; i++) { var row = data[i]; _html += '
  • '; //_html += ' ' + row.name + ''; _html += ' ' + row.name + ''; _html += '
  • '; } $("#bottomproducts").prepend(_html); } }); } function showinfo(keyvalue,pid,issinglepage,currentname) { $("#current").text(currentname); var dataid = $(this).attr('data-id'); $('#left-nav li').each(function () { if ($(this).data('id') == keyvalue) { if (!$(this).hasclass('active')) { $("#left-nav li").removeclass("active"); $(this).addclass("active"); //显示数据 if (issinglepage == 0) { getarticlebytaxis(keyvalue); } else if (pid == "8ca4b4cc-86dc-4e5c-9384-46a4bbdbb31c") { location.href = "/about/detailes?column=" + keyvalue + "&pid=" + pid; } else { location.href = "/article/index?column=" + keyvalue + "&pid=" + pid; } return false; } } }); $('#articleinfo img').each(function () { $(this).addclass("img-responsive"); }); } function getarticlebytaxis(taxisvalue) { $.ajax({ url: "/web/getarticlebytaxis", data: { taxisvalue: taxisvalue }, datatype: "json", async: false, success: function (data) { var _htmlcontent = ""; var _htmlcurrentname=""; //var _ for (var i = 0; i < data.length; i++) { var row = data[i]; _htmlcontent = row.contents; $('#left-nav li').each(function () { if ($(this).data('id') == taxisvalue) { $("#left-nav li").removeclass("active"); $(this).addclass("active"); _htmlcurrentname = $(this).text(); } }); } $("#articleinfo").text(""); $("#articleinfo").append(_htmlcontent); $("#current").text(_htmlcurrentname); } }); } function getarticlebyid(keyvalue) { $.ajax({ url: "/web/getarticlebyid", data: { keyvalue: keyvalue }, datatype: "json", async: false, success: function (data) { var _htmlcontent = ""; var _htmlcurrentname = ""; //var _ _htmlcontent = data.contents; $('#left-nav li').each(function () { if ($(this).data('id') == keyvalue) { $("#left-nav li").removeclass("active"); $(this).addclass("active"); _htmlcurrentname = $(this).text(); } }); $("#articleinfo").text(""); $("#articleinfo").append(_htmlcontent); $("#current").text(_htmlcurrentname); $('#articleinfo img').each(function () { $(this).addclass("img-responsive"); }); } }); } function changetaxis(keyvalue, dataurl, datapid) { //var dataurl = $(this).attr('data-url'); //var dataid = $(this).attr('data-id'); //var datapid = $(this).attr('data-pid'); var _htmlcurrentname = ""; $('#left-nav li').each(function () { if ($(this).data('id') == keyvalue) { if (!$(this).hasclass('active')) { $("#left-nav li").removeclass("active"); $(this).addclass("active"); _htmlcurrentname = $(this).text(); return false; } } }); if (dataurl == location.pathname) { commonfn.buildajaxpaginator(keyvalue); $("#current").text(_htmlcurrentname); } else { location.href = dataurl + "?column=" + keyvalue + "&pid=" + datapid; } } function loadcol(keyvalue) { var _htmlcurrentname = ""; $('#left-nav li').each(function () { if ($(this).data('id') == keyvalue) { $("#left-nav li").removeclass("active"); $(this).addclass("active"); _htmlcurrentname = $(this).text(); return false; } }); $("#current").text(_htmlcurrentname); } function initindex() { getsiteinfo(); getloadnav(); getbottomnav(); //$('#bottomabout .bottomabout').on('click', function () { // dataurl = $(this).attr('data-url'); // dataid = $(this).attr('data-id'); // $.ajax({ // url: dataurl, // data: { keyvalue: dataid }, // datatype: "json", // async: false, // complete: function () { location.href = dataurl }//跳转页面 // //success: function (data) { // // location.href = dataurl; // //} // }); //}); }