微信订单管理功能

This commit is contained in:
wule committed 2026-05-23 18:42:47 +08:00
1 parent e5910fc100
commit 2afe960b6c
19 files changed
+2095 -318

No files matched your search

+26
View File
@@ -674,6 +674,32 @@ namespace AllBase
return temp;
}
/// <summary>
/// 获取字符串值,多个参数,返回第一个匹配的
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static string GetStringJsonByRegs(ref string html, string defaultValue, params string[] regs)
{
foreach (var reg in regs)
{
string temp = GetMatchRegexString(html, @"[""]" + reg + @"[""][\s]*:[\s]*[""]([^""]+?)[""]");
if (temp != null)
return temp;
temp = GetMatchRegexString(html, @"[""]" + reg + @"[""][\s]*:[\s]*[""]([^""]*?)[""]");
if (temp != null)
return temp;
temp = GetMatchRegexString(html, @"[']" + reg + @"['][\s]*:[\s]*[']([^']*?)[']");
if (temp != null)
return temp;
temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d]+)");
if (temp != null)
return temp;
}
return defaultValue;
}
public static string GetOneJsonObjStrJson(ref string html, string reg)
{
return GetJsonObjStrJson(ref html, reg).FirstOrDefault();