店铺退货包裹读取放到后台

This commit is contained in:
wule committed 2025-08-21 19:34:57 +08:00
1 parent 4693c42024
commit 2a4a3ef744
13 files changed
+1021 -377

No files matched your search

+32
View File
@@ -549,6 +549,23 @@ namespace AllBase
return 0;
}
/// <summary>
/// 获取值
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static int? GetNullableIntJson(ref string html, string reg)
{
string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]");
if (string.IsNullOrEmpty(temp))
temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d-]+)");
int i;
if (int.TryParse(temp, out i))
return i;
return null;
}
/// <summary>
/// 获取值
/// </summary>
@@ -564,6 +581,21 @@ namespace AllBase
return false;
}
/// <summary>
/// 获取值
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <returns></returns>
public static bool? GetNullableBoolJson(ref string html, string reg)
{
var temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*(true|false)");
bool res;
if (bool.TryParse(temp, out res))
return res;
return null;
}
/// <summary>
/// 时间戳转字符串时间
/// </summary>