diff --git a/BBWYB.Server.Business/PurchaseScheme/PurchaseProductAPIService.cs b/BBWYB.Server.Business/PurchaseScheme/PurchaseProductAPIService.cs index 1011e70..fcff95a 100644 --- a/BBWYB.Server.Business/PurchaseScheme/PurchaseProductAPIService.cs +++ b/BBWYB.Server.Business/PurchaseScheme/PurchaseProductAPIService.cs @@ -218,8 +218,24 @@ namespace BBWYB.Server.Business #region 验证purchaserName var purchaserName = jobject["globalData"]["tempModel"]["companyName"].ToString(); if (invalidPurchaserNameList.Contains(purchaserName)) - { - //取 + { + var storeDataMatch = Regex.Match(_1688pageResult.Content, @"(window\.__STORE_DATA=)(.*)(\r*\n*\s*)"); + if (storeDataMatch.Success) + { + try + { + var jsonStr_storeData = storeDataMatch.Groups[2].Value; + var jobject_storeData = JObject.Parse(jsonStr_storeData); + var purchaserName_storeData = jobject_storeData["components"]?["38229149"]?["moduleData"]?["companyName"].ToString(); + if (string.IsNullOrEmpty(purchaserName_storeData)) + purchaserName_storeData = jobject_storeData["components"]?["38229148"]?["moduleData"]?["companyName"].ToString(); + if (string.IsNullOrEmpty(purchaserName_storeData)) + purchaserName_storeData = jobject_storeData["components"]?["38229150"]?["moduleData"]?["companyName"].ToString(); + if (!string.IsNullOrEmpty(purchaserName_storeData)) + purchaserName = purchaserName_storeData; + } + catch { } + } } #endregion