Browse Source

1688商品详情爬虫更新

qianyi
shanji 3 years ago
parent
commit
66b0bb34a0
  1. 3
      BBWY.Client/APIServices/PurchaseProductAPIService.cs
  2. 34
      BBWY.Client/ViewModels/Ware/BindingPurchaseProductViewModel.cs

3
BBWY.Client/APIServices/PurchaseProductAPIService.cs

@ -200,7 +200,8 @@ namespace BBWY.Client.APIServices
};
var colorsProperty = jobject["globalData"]["skuModel"]["skuProps"].FirstOrDefault(j => j.Value<int>("fid") == 3216 ||
j.Value<int>("fid") == 1627207)["value"]
j.Value<int>("fid") == 1627207 ||
j.Value<int>("fid") == 1234)["value"]
.Children()
.Select(j => new
{

34
BBWY.Client/ViewModels/Ware/BindingPurchaseProductViewModel.cs

@ -341,40 +341,6 @@ namespace BBWY.Client.ViewModels
purchaseSchemeProduct.PurchaseUrl = purchaseUrl;
purchaseSchemeProduct.PurchaseProductId = purchaseProductId;
//var purchaseSchemeProductSkuList = LoadPurchaseProductCore(purchaseProductId,
// out string errorMsg,
// out string purchaserId,
// out string purchaserName,
// out string purchaserLocation,
// (p) =>
// {
// if (sku.PurchaseSchemeList.Any(s => s.PurchaserId == p))
// return $"sku{sku.Id}的采购方案中已存在相同的采购商";
// if (!string.IsNullOrEmpty(PurchaserId) && p != PurchaserId)
// return "采购商必须相同";
// return string.Empty;
// });
//IsLoading = false;
//if (!string.IsNullOrEmpty(errorMsg))
//{
// App.Current.Dispatcher.Invoke(() =>
// {
// MessageBox.Show(errorMsg, "绑定采购商");
// });
// return;
//}
//PurchaserId = purchaserId;
//PurchaserName = purchaserName;
//PurchaserLocation = purchaserLocation;
//purchaseSchemeProduct.PurchaseUrl = purchaseUrl;
//purchaseSchemeProduct.PurchaseProductId = purchaseProductId;
//LoadPurchaseProduct(purchaseSchemeProduct, purchaseSchemeProductSkuList);
});
}

Loading…
Cancel
Save