修复一些上传问题

This commit is contained in:
wule_5900x committed 2026-03-26 23:37:27 +08:00
1 parent 2f61dc1cdd
commit 3b3a903e25
5 files changed
+47 -17

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary>
/// 版本ID
/// </summary>
public static int VersionCount = 932;
public static int VersionCount = 935;
//public static int VersionCount = 613;
/// <summary>
+2 -2
View File
@@ -685,7 +685,7 @@ namespace AllBase
if (html == null)
return rstLst;
string htmlTmp = html.Replace("\\{", "\\这里是正花括号占位符").Replace("\\}", "\\这里是反花括号占位符");
string htmlTmp = html.Replace("\\{", "\\这里是正花括号占位符").Replace("\\}", "\\这里是反花括号占位符").Replace("\"" + reg + "\": {", "\"" + reg + "\":{");
retry:
string lvStr = "";
@@ -738,7 +738,7 @@ namespace AllBase
if (html == null)
return rstLst;
string htmlTmp = html.Replace("\\[", "\\这里是正方括号占位符").Replace("\\]", "\\这里是反方括号占位符");
string htmlTmp = html.Replace("\\[", "\\这里是正方括号占位符").Replace("\\]", "\\这里是反方括号占位符").Replace("\"" + reg + "\": [", "\"" + reg + "\":[");
retry:
var index1 = htmlTmp.IndexOf("\"" + reg + "\":[");
+28 -5
View File
@@ -1571,6 +1571,16 @@ namespace TemuKJD.BLL
var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]);
var baseData = JsonHelper.JObjectParse(dbProd.product_json)["baseData"].ParseToString();
var str_lst = BaseRegex.GetJsonArrStrJson(ref baseData, "productSkus");
try
{
var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault();
var productSkus = JsonHelper.DeserializeJsonToList<WXProductSkuInfoLite>(regex_str);
}
catch
{
}
WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject<WXClientProductInfoLite>(wxxdData);
if (wxClientProdInfo.info.sku_list == null)
{
@@ -1863,14 +1873,27 @@ namespace TemuKJD.BLL
// addPrice = 100;
//skuInfo.multi_price += addPrice;
//skuInfo.price += addPrice;
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
if (wxEditSkuInfo.productSkuInfo.saleParam != null)
{
foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam)
{
skuInfo.spec.Add(new spec_item()
{
parent_id = wxSpec.categorys[0].catId.ParseToLong(),
parent_name = wxSpec.categorys[0].name,
spec_id = wxSpec.categorys[1].catId.ParseToLong(),
spec_name = wxSpec.categorys[1].name,
});
}
}
else
{
skuInfo.spec.Add(new spec_item()
{
parent_id = wxSpec.categorys[0].catId.ParseToLong(),
parent_name = wxSpec.categorys[0].name,
spec_id = wxSpec.categorys[1].catId.ParseToLong(),
spec_name = wxSpec.categorys[1].name,
parent_id = 0,
parent_name = "规格",
spec_id = 0,
spec_name = "默认",
});
}
skuInfo.out_sku_sn = wxEditSkuInfo.productSkuInfo.skuCode;
@@ -253,12 +253,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms
BaseMsgForm.ShowError("商品结构获取失败 " + convertRst);
return;
}
string exportData = dbProd.product_json;
var address = Path.Combine("D:\\", dbProd.spu_id + ".txt");
using (StreamWriter sw = new StreamWriter(Path.Combine("D:\\", dbProd.spu_id + ".txt"), false, Encoding.UTF8))
{
sw.Write(exportData);
}
//string exportData = dbProd.product_json;
//var address = Path.Combine("D:\\", dbProd.spu_id + ".txt");
//using (StreamWriter sw = new StreamWriter(Path.Combine("D:\\", dbProd.spu_id + ".txt"), false, Encoding.UTF8))
//{
// sw.Write(exportData);
//}
}
if (dbProd.product_get_type_text == "微信店采")
{
@@ -1773,7 +1773,7 @@ namespace TemuKJD.WXForms.ProductForms
continue;
}
if (needAddRandomBlock || wantAddRandomBlock)
if (needAddRandomBlock || wantAddRandomBlock || gallery_item.url.Contains("wst.wxapp.tc.qq.com"))
{
// 如果想打码或者需要打码,就走差异化详情图,不走api直传
}
@@ -2558,7 +2558,7 @@ namespace TemuKJD.WXForms.ProductForms
continue;
}
if (needAddRandomBlock || wantAddRandomBlock)
if (needAddRandomBlock || wantAddRandomBlock || gallery_item.url.Contains("wst.wxapp.tc.qq.com"))
{
// 如果想打码或者需要打码,就走差异化详情图,不走api直传
}
@@ -2954,6 +2954,13 @@ namespace TemuKJD.WXForms.ProductForms
else
attr.value = "100 ml";
}
else if (attr.value == "L")
{
if ((propInfo.values.FirstOrDefault()?.value).ParseToString().EndsWith(attr.value))
attrValue = propInfo.values.FirstOrDefault()?.value;
else
attr.value = "100 ml";
}
else if (attr.value == "g;kg;ml;L")
{
var propInfoValue = (propInfo.values.FirstOrDefault()?.value).ParseToString();
@@ -3206,7 +3213,7 @@ namespace TemuKJD.WXForms.ProductForms
continue;
}
// 使用接口链接传sku图
if (1 == 1)
if (1 == 1 && !sku.thumb_url.Contains("wst.wxapp.tc.qq.com"))
{
var urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image");
var upDate = UserLogin.GetSignaturex();