Hidistro.UI.Web/API/Hi_Ajax_GetProductsCount.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.UI.Web.API
{
using Hidistro.ControlPanel.Commodities;
using Hidistro.Core;
using Hidistro.Entities.Members;
using Hidistro.SaleSystem.Vshop;
using System;
using System.Web;
public class Hi_Ajax_GetProductsCount : IHttpHandler
{
public string GetCountJson()
{
string siteName = "";
string logoUrl = "";
HttpCookie cookie = HttpContext.Current.Request.Cookies["Vshop-ReferralId"];
int currentMemberUserId = 0;
try
{
if (HttpContext.Current.Request["ReferralId"] != null)
{
currentMemberUserId = Convert.ToInt32(HttpContext.Current.Request["ReferralId"]);
}
else
{
if ((cookie == null) || (cookie.Value == "0"))
{
siteName = SettingsManager.GetMasterSettings(true).SiteName;
logoUrl = SettingsManager.GetMasterSettings(true).LogoUrl;
return string.Concat(new object[] { "{\"count\":", ProductHelper.GetProductsCount(), ",\"storeName\":\"", siteName, "\",\"logoUrl\":\"", logoUrl, "\"}" });
}
}
}
catch
{
}
int shopType = 0;
DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(Convert.ToInt32(currentMemberUserId));
if (currentDistributors != null)
{
siteName = currentDistributors.StoreName;
logoUrl = currentDistributors.Logo;
shopType = currentDistributors.ShopType;
}
return string.Concat(new object[] { "{\"count\":", ProductHelper.GetProductsCountByDistributor(Convert.ToInt32(currentMemberUserId), shopType), ",\"storeName\":\"", siteName, "\",\"logoUrl\":\"", logoUrl, "\"}" });
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write(this.GetCountJson());
}
public bool IsReusable
{
get
{
后面还有 6 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
