function show_nav_second(id, _channel_id, link_url, title) { if (link_url == "模板-子导航") { show_nav_second_main_business(id, _channel_id, link_url, title); } else if (link_url == "标准") { show_nav_second_standard(id, _channel_id, link_url, title); } else { var sb = "
"; sb = sb + "
"; $(".nav-second").append(sb); } } function show_nav_second_standard(id, _channel_id, link_url, title) { var sb = "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; $.ajax({ type: "post", url: "/cgi/getclass", data: { channel_id: _channel_id , navigation_id: id }, success: function (msg) { var data = json.parse(msg); var newdata = json.parse(data.data); $("#show_nav_sub_title_" + newdata.navigation_id).text(decodeuri(newdata.sub_title)); $("#show_nav_remark_" + newdata.navigation_id).text(decodeuri(newdata.remark)); for (var i = 0; i < newdata.category.length; i++) { ///public/{channel_id}/{category_id} ///public/{id} var newurl = newdata.category[i].link_url.replace("{id}", newdata.category[i].id); newurl = newurl.replace("{channel_id}", newdata.category[i].channel_id); newurl = newurl.replace("{category_id}", newdata.category[i].id); var list_sb = "" + newdata.category[i].title + ""; $("#show_nav_" + newdata.navigation_id).append(list_sb); } } }); sb = sb + "
"; sb = sb + "
"; sb = sb + "

" + title + "

"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; if (_channel_id == 0) {//走进旅发专用 sb = sb + "公司简介"; sb = sb + " 领导成员"; sb = sb + " 组织架构"; sb = sb + " 荣誉资质"; sb = sb + " 企业文化"; sb = sb + " 领导关怀"; } sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; $(".nav-second").append(sb); } function show_nav_second_main_business(id, _channel_id, link_url, title) { var sb = "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
    "; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; sb = sb + "
"; $(".nav-second").append(sb); main_menu(id, _channel_id); } //业务模块-二级导航 function main_menu(id, _channel_id) { $.ajax({ type: "post", url: "/cgi/main_menu", data: { navigation_id: id , channel_id: _channel_id }, success: function (msg) { var data = json.parse(msg); var newdata = json.parse(data.data); var indexid = 0; for (var i = 0; i < newdata.channelall.length; i++) { var list_sb = "
  • " + newdata.channelall[i].title + "
  • "; $("#scroll-bar" + newdata.navigation_id).append(list_sb); var sb = "
    ";//show $("#scroll-bar-content").append(sb); load_class(newdata.channelall[i].channel_id, 1,i); } } }); } //业务模块-三级导航 function load_class(_channel_id, initshow,xh) { $(".onall").removeclass("on"); $(".onall" + _channel_id).addclass("on"); if (initshow == 0) { $(".nav-tabitem").removeclass("show"); $("#show_id_nav-tabitem" + _channel_id).addclass("show"); return false; } $.ajax({ type: "post", url: "/cgi/channel_main_menu", data: { channel_id: _channel_id }, success: function (msg) { var data = json.parse(msg); var tree_parent_id0 = load_class_tree(data.data, 0); var sb = ""; sb = sb + "

    " + $(".onall" + _channel_id).attr("title") + "

    "; sb = sb + "
    "; for (var i = 0; i < tree_parent_id0.length; i++) { sb = sb + "
    "; sb = sb + "
    " + tree_parent_id0[i].title + "
    "; sb = sb + "
    "; var tree_parent_id1 = load_class_tree(data.data, tree_parent_id0[i].id); for (var j = 0; j < tree_parent_id1.length; j++) { sb = sb + " " + tree_parent_id1[j].title + ""; } sb = sb + "
    "; sb = sb + "
    "; } sb = sb + "
    "; $("#show_id_nav-tabitem" + _channel_id).append(sb); if (xh == 0) { $(".onall").removeclass("on"); $(".onall" + _channel_id).addclass("on"); $("#show_id_nav-tabitem" + _channel_id).addclass("show"); } } }); } function load_class_tree(olddata, parent_id) { var new_data = []; for (var i = 0; i < olddata.length; i++) { if (olddata[i].parent_id == parent_id) { new_data.push(olddata[i]); } } return new_data; } function goto(url) { window.open(url); }