|
|
@ -92,11 +92,11 @@ namespace BBWY.Client.APIServices |
|
|
|
if (result.StatusCode != System.Net.HttpStatusCode.OK) |
|
|
|
throw new Exception($"{result.StatusCode} {result.Content}"); |
|
|
|
|
|
|
|
var j = JObject.Parse(result.Content); |
|
|
|
var isOK = j.Value<string>("error_code") == "0000"; |
|
|
|
var jobject = JObject.Parse(result.Content); |
|
|
|
var isOK = jobject.Value<string>("error_code") == "0000"; |
|
|
|
if (isOK) |
|
|
|
{ |
|
|
|
var skuJArray = (JArray)j["item"]["skus"]["sku"]; |
|
|
|
var skuJArray = (JArray)jobject["item"]["skus"]["sku"]; |
|
|
|
if (skuJArray.Count == 0) |
|
|
|
{ |
|
|
|
//errorMsg = $"商品{purchaseSchemeProduct.PurchaseProductId}缺少sku信息";
|
|
|
@ -112,14 +112,14 @@ namespace BBWY.Client.APIServices |
|
|
|
PurchaseSkuId = j.Value<string>("sku_id"), |
|
|
|
PurchaseSkuSpecId = j.Value<string>("spec_id"), |
|
|
|
Title = j.Value<string>("properties_name"), |
|
|
|
Logo = GetOneBoundSkuLogo(j, (JArray)j["item"]["prop_imgs"]["prop_img"]) |
|
|
|
Logo = GetOneBoundSkuLogo(j, (JArray)jobject["item"]["prop_imgs"]["prop_img"]) |
|
|
|
}).ToList(); |
|
|
|
|
|
|
|
var purchaserId = j["item"]["seller_info"].Value<string>("user_num_id"); |
|
|
|
var purchaserName = j["item"]["seller_info"].Value<string>("title"); |
|
|
|
var purchaserId = jobject["item"]["seller_info"].Value<string>("user_num_id"); |
|
|
|
var purchaserName = jobject["item"]["seller_info"].Value<string>("title"); |
|
|
|
if (string.IsNullOrEmpty(purchaserName)) |
|
|
|
purchaserName = j["item"]["seller_info"].Value<string>("shop_name"); |
|
|
|
var purchaserLocation = j["item"].Value<string>("location"); |
|
|
|
purchaserName = jobject["item"]["seller_info"].Value<string>("shop_name"); |
|
|
|
var purchaserLocation = jobject["item"].Value<string>("location"); |
|
|
|
|
|
|
|
return (new Purchaser() |
|
|
|
{ |
|
|
@ -199,7 +199,7 @@ namespace BBWY.Client.APIServices |
|
|
|
Location = jobject["data"]["1081181309101"]["data"]["location"].ToString() |
|
|
|
}; |
|
|
|
|
|
|
|
var colorsProperty = jobject["globalData"]["skuModel"]["skuProps"].FirstOrDefault(j => j.Value<int>("fid") == 3216 && |
|
|
|
var colorsProperty = jobject["globalData"]["skuModel"]["skuProps"].FirstOrDefault(j => j.Value<int>("fid") == 3216 || |
|
|
|
j.Value<int>("fid") == 1627207)["value"] |
|
|
|
.Children() |
|
|
|
.Select(j => new |
|
|
|