HiTemplate/GoodsMobule.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace HiTemplate
{
using HiTemplate.Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using System.Web.UI;
public class GoodsMobule : RazorModuleWebControl
{
public string GetDataJson()
{
Exception exception;
string str = "";
try
{
string s = string.Format("ShowPrice={0}&Layout={1}&ShowIco={2}&ShowName={3}&IDs={4}", new object[] { base.ShowPrice, base.Layout, base.ShowIco, base.ShowName, this.IDs });
byte[] bytes = Encoding.UTF8.GetBytes(s);
string applicationPath = Urls.ApplicationPath;
if (string.IsNullOrEmpty(base.DataUrl))
{
applicationPath = applicationPath + "/api/Hi_Ajax_GoodsList.ashx";
}
else
{
applicationPath = applicationPath + base.DataUrl;
}
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(applicationPath);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = bytes.Length;
try
{
request.GetRequestStream().Write(bytes, 0, bytes.Length);
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
StringBuilder builder = new StringBuilder();
while (-1 != reader.Peek())
{
builder.Append(reader.ReadLine());
}
str = builder.ToString();
}
catch (Exception exception1)
{
exception = exception1;
str = "错误:" + exception.Message;
}
}
catch (Exception exception2)
{
exception = exception2;
str = "错误:" + exception.Message;
}
return str;
后面还有 22 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
