MxWeiXinPF.Web/admin/magazine/getdata.ashx.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MxWeiXinPF.Common;
using MxWeiXinPF.Web.UI;
using System.Data;
using System.Text;
namespace MxWeiXinPF.Web.admin.magazine
{
/// <summary>
/// getdata 的摘要说明
/// </summary>
public class getdata : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/json";
Dictionary<string, string> jsonDict = new Dictionary<string, string>();
string _action = MyCommFun.QueryString("myact");
if (_action == "uploadImg")
{
#region 图片上传
try
{
string uploadFileRet = UpLoadFile(context);
Dictionary<string, object> dict = MyCommFun.JsonToDictionary(uploadFileRet);
if (dict["status"].ToString() == "0")
{
//上传失败
jsonDict.Add("res", "0");
jsonDict.Add("content", dict["msg"].ToString());
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
else if (dict["status"].ToString() == "1")
{
//上传成功,修改用户的头像url
jsonDict.Add("res", "1");
jsonDict.Add("thumb", dict["thumb"].ToString());
jsonDict.Add("newPhotoUrl", dict["path"].ToString());
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
}
catch (Exception e)
{
//上传失败
jsonDict.Add("res", "0");
jsonDict.Add("content", e.Message);
context.Response.Write(MyCommFun.getJsonStr(jsonDict));
return;
}
#endregion
}
if (_action == "getAm")
后面还有 79 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
