Browse Source

Fix CakeProduct sample

pull/184/head
Jadyn 4 years ago
parent
commit
8c3338ce98
  1. 6
      samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs

6
samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs

@ -57,12 +57,12 @@ public class IndexModel : EShopSamplePageModel
Sorting = "CreationTime DESC"
});
Order = OrderList.Items.FirstOrDefault(x => x.OrderStatus is OrderStatus.Pending);
Store = await _storeAppService.GetDefaultAsync();
CakeProduct = await _productAppService.GetByUniqueNameAsync(Store.Id, SampleDataConsts.CakeProductUniqueName);
Order = OrderList.Items.FirstOrDefault(x => x.OrderStatus is OrderStatus.Pending && x.OrderLines.Any(ol => ol.ProductId == CakeProduct.Id));
Wallet = (await _accountAppService.GetListAsync(new GetAccountListInput { UserId = CurrentUser.Id })).Items[0];
}
@ -90,7 +90,7 @@ public class IndexModel : EShopSamplePageModel
sb.Append(',');
}
}
sb.Append('}');
sb.Append($",\"skuId\":\"{sku.Id}\"");

Loading…
Cancel
Save