Files
upload-web/NeedDownList.aspx.cs
T
2025-02-20 15:08:30 +08:00

54 lines
1.3 KiB
C#

using SiteCore.Redis;
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class NeedDownList : System.Web.UI.Page
{
private void conSuc(string msg)
{
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Write("{\"type\":\"success\",\"result\":\"" + msg + "\"}");
//Response.End();
}
private void conErc(string msg)
{
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Write("{\"type\":\"error\",\"result\":\"" + msg + "!\"}");
//Response.End();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
int userId = 0;
if (Request["userid"] != null)
{
userId = Convert.ToInt32(Request["userid"]);
}
if (userId<=0)
{
conErc("缺少必要的参数");
return;
}
string key = "file_client_down_list_" + userId;
string data = erpRedis.RedisHelper.ListRightPop<string>(key);
if (data == null)
data = "";
conSuc(data);
}
}
}