日期:2014-05-17 浏览次数:20495 次
$(document).ready(function () {
$.ajax(
{
async: false,
cache: false,
type: "POST",
url: "Ashx/getSysMenu.ashx",
success: function (data) {
zNodes = eval("(" + data + ")");
},
error: function (data) {
alert(data);
}
});
zTreeObj = $.fn.zTree.init($("#tree"), setting, zNodes);
});
public void ProcessRequest(HttpContext context)
{
if (context.Session["UserInfo"] != null)
{
//ZTree加载
SynchronousJsonTree(context);
}
else
{
context.Response.Write(string.Format(@"window.location.href='{0}'","Logon.aspx"));
}
}
/// <summary>
/// 同步ZTree加载
/// </summary>
/// <param name="context"></param>
private void SynchronousJsonTree(HttpContext context)
{
//
SYS_UserInfo user = context.Session["UserInfo