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

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

@@ -956,13 +956,16 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
// 头词
if (chkHeadWords.Checked)
{
if (string.IsNullOrEmpty(GlobalConfig.ProductWords.HeadWords))
if (GlobalConfig.ProductWords.HeadWords == null)
GlobalConfig.ProductWords.HeadWords = "";
int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
.Select(s => s.ParseToInt()).ToArray();
//int[] heads = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries)
// .Select(s => s.ParseToInt()).ToArray();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
int[] heads = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToArray();
if (heads.Length > 1 && heads[1] > heads[0])
headWords = Randomx.GetId(heads[0], heads[1]) + "个";
headWords = Randomx.GetId(heads[0], heads[1]) + headTemp.Replace(heads[0] + "-" + heads[1], "");
}
// 尾词
@@ -1680,7 +1683,11 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
string headWords = "";
if (!string.IsNullOrWhiteSpace(GlobalConfig.ProductWords.HeadWords))
{
var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
//var numbers = GlobalConfig.ProductWords.HeadWords.Split(new string[] { "-", "个" }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ParseToInt()).ToList();
string headTemp = GlobalConfig.ProductWords.HeadWords.Trim();
var numberRegex = BaseRegex.GetMatchRegex(headTemp, "\\d{1,9}");
var numbers = numberRegex.Cast<Match>().Select(m => m.Value.ParseToInt()).ToList();
int minNum = 5;
int maxNum = 19;
if (numbers.Count > 0 && numbers[0] > 0)
@@ -1694,7 +1701,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms
{
maxNum = minNum;
}
headWords += Randomx.GetId(minNum, maxNum + 1) + "个";
headWords += Randomx.GetId(minNum, maxNum + 1) + headTemp.Replace(minNum + "-" + maxNum, "");
}
}