Hidistro.UI.Web/Admin/Shop/GetCustomerService.cs

(完整代码) 1KB


using System;
using System.Web;
using ControlPanel.Settings;
using Hidistro.Entities.Settings;
using Newtonsoft.Json;

namespace Hidistro.UI.Web.Admin.Shop
{
    public class GetCustomerService : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int result = 0;
            int.TryParse(context.Request["id"].ToString(), out result);
            if (result > 0)
            {
                CustomerServiceInfo customer = CustomerServiceHelper.GetCustomer(result);
                var type = new
                {
                    type = "success",
                    userver = customer.userver,
                    password = customer.password,
                    nickname = customer.nickname
                };
                string s = JsonConvert.SerializeObject(type);
                context.Response.Write(s);
            }
            else
            {
                var type2 = new
                {
                    type = "success",
                    userver = string.Empty,
                    password = string.Empty,
                    nickname = string.Empty
                };
                string str2 = JsonConvert.SerializeObject(type2);
                context.Response.Write(str2);
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。