54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using AllBase;
|
|
using NaiBa.Util.Extension;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Work.BLL.Product
|
|
{
|
|
public class ViolateBLL
|
|
{
|
|
public static string GetViolate(string upId, long upIdNumber)
|
|
{
|
|
string address = BaseClass.BuildObjString("violate&act=get");
|
|
string param = UserLogin.GetSignaturex()
|
|
+ "&pid=" + upId
|
|
+ "&suffix=" + upIdNumber % 1024;
|
|
string html = GetHtml.PostUtf8(address, param);
|
|
if (html == null)
|
|
html = "";
|
|
var data = BaseRegex.GetStringJson(ref html, "data");
|
|
if (data == null)
|
|
{
|
|
if (html.Contains("\"msg\":\"success\""))
|
|
data = "none";
|
|
else
|
|
data = "";
|
|
}
|
|
return data;
|
|
}
|
|
|
|
public static string GetViolateList(List<string> upIds)
|
|
{
|
|
if (upIds == null)
|
|
upIds = new List<string>();
|
|
|
|
string address = BaseClass.BuildObjString("violate&act=get_list");
|
|
string param = UserLogin.GetSignaturex() + "&pids=";
|
|
foreach (var id in upIds)
|
|
{
|
|
var idStr = id;
|
|
idStr = BaseRegex.GetMatchRegexString(ref idStr, "(\\d{5,30})");
|
|
if (idStr == null)
|
|
continue;
|
|
|
|
param += id + "," + (idStr.ParseToLong() % 1024) + ";";
|
|
}
|
|
string html = GetHtml.PostUtf8(address, param.TrimEnd(';'));
|
|
return html;
|
|
}
|
|
}
|
|
}
|