Hidistro.UI.Web/Admin/Shop/Hi_Ajax_GetFolderTree.cs
(完整代码) 1KBnamespace Hidistro.UI.Web.Admin.Shop
{
using Hidistro.ControlPanel.Store;
using System;
using System.Data;
using System.Text;
using System.Web;
public class Hi_Ajax_GetFolderTree : IHttpHandler
{
public string GetImgTypeJson()
{
string str = "";
DataTable photoCategories = GalleryHelper.GetPhotoCategories();
for (int i = 0; i < photoCategories.Rows.Count; i++)
{
object obj2 = str + "{";
object obj3 = string.Concat(new object[] { obj2, "\"name\":\"", photoCategories.Rows[i]["CategoryName"], "\"," }) + "\"parent_id\":0,";
str = (string.Concat(new object[] { obj3, "\"id\":", photoCategories.Rows[i]["CategoryId"], "," }) + "\"picNum\":" + GalleryHelper.GetPhotoList("", new int?(Convert.ToInt32(photoCategories.Rows[i]["CategoryId"])), 10, PhotoListOrder.UploadTimeDesc).TotalRecords) + "},";
}
return str.TrimEnd(new char[] { ',' });
}
public string GetTreeListJson()
{
StringBuilder builder = new StringBuilder();
builder.Append("{\"status\":1,");
builder.Append("\"data\":{");
builder.Append("\"total\":" + GalleryHelper.GetPhotoList("", 0, 10, PhotoListOrder.UploadTimeDesc).TotalRecords + ",");
builder.Append("\"tree\":[");
builder.Append(this.GetImgTypeJson());
builder.Append("]");
builder.Append("},");
builder.Append("\"msg\":\"\"");
builder.Append("}");
return builder.ToString();
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write(this.GetTreeListJson());
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
