From 33c77424758cc1d8ed5f4d7244fe0d9af7c7d1dd Mon Sep 17 00:00:00 2001 From: shanji <18996038927@163.com> Date: Mon, 17 Jul 2023 13:06:04 +0800 Subject: [PATCH] 10028 --- BBWYB.Client/APIServices/ProductService.cs | 29 ++++++++++--------- BBWYB.Client/GlobalContext.cs | 2 +- .../ViewModels/Ware/WareManagerViewModel.cs | 5 ++-- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/BBWYB.Client/APIServices/ProductService.cs b/BBWYB.Client/APIServices/ProductService.cs index 6bb7947..8de8ee3 100644 --- a/BBWYB.Client/APIServices/ProductService.cs +++ b/BBWYB.Client/APIServices/ProductService.cs @@ -10,20 +10,21 @@ namespace BBWYB.Client.APIServices { public ProductService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { } - public ApiResponse GetProductList(string spu, string productName, string productItem, int pageIndex) + public ApiResponse GetProductList(string spu, string productName, string productItem, int pageIndex, int pageSize) { return SendRequest(globalContext.BBWYApiHost, "api/product/GetProductList", new { - Spu = spu, - ProductName = productName, - ProductItem = productItem, - PageIndex = pageIndex, - Platform = globalContext.User.Shop.Platform, - AppKey = globalContext.User.Shop.AppKey, - AppSecret = globalContext.User.Shop.AppSecret, - AppToken = globalContext.User.Shop.AppToken + spu, + productName, + productItem, + pageIndex, + pageSize, + globalContext.User.Shop.Platform, + globalContext.User.Shop.AppKey, + globalContext.User.Shop.AppSecret, + globalContext.User.Shop.AppToken }, null, HttpMethod.Post); @@ -37,10 +38,10 @@ namespace BBWYB.Client.APIServices { Spu = spu, Sku = sku, - Platform = globalContext.User.Shop.Platform, - AppKey = globalContext.User.Shop.AppKey, - AppSecret = globalContext.User.Shop.AppSecret, - AppToken = globalContext.User.Shop.AppToken + globalContext.User.Shop.Platform, + globalContext.User.Shop.AppKey, + globalContext.User.Shop.AppSecret, + globalContext.User.Shop.AppToken }, null, HttpMethod.Post); @@ -85,5 +86,5 @@ namespace BBWYB.Client.APIServices // } - + } diff --git a/BBWYB.Client/GlobalContext.cs b/BBWYB.Client/GlobalContext.cs index fe232b5..911130a 100644 --- a/BBWYB.Client/GlobalContext.cs +++ b/BBWYB.Client/GlobalContext.cs @@ -20,7 +20,7 @@ namespace BBWYB.Client { public GlobalContext() { - BBWYBApiVersion = "10027"; + BBWYBApiVersion = "10028"; } private User user; diff --git a/BBWYB.Client/ViewModels/Ware/WareManagerViewModel.cs b/BBWYB.Client/ViewModels/Ware/WareManagerViewModel.cs index c0d4a14..78bbdc0 100644 --- a/BBWYB.Client/ViewModels/Ware/WareManagerViewModel.cs +++ b/BBWYB.Client/ViewModels/Ware/WareManagerViewModel.cs @@ -57,6 +57,7 @@ namespace BBWYB.Client.ViewModels #region Methods public WareManagerViewModel(GlobalContext globalContext, BindingPurchaseProductViewModel bindingPurchaseProduct, PurchaseService purchaseService, ProductService productService) { + PageSize = 5; AddPurchaserCommand = new RelayCommand(AddPurchaser); EditPurchaserCommand = new RelayCommand(EditPurchaser); DeletePurchaserCommand = new RelayCommand(DeletePurchaser); @@ -111,7 +112,7 @@ namespace BBWYB.Client.ViewModels IsLoading = false; return; } - productApiResponse = productService.GetProductList(skuResponse.Data.Items[0].ProductId, string.Empty, string.Empty, pageIndex); + productApiResponse = productService.GetProductList(skuResponse.Data.Items[0].ProductId, string.Empty, string.Empty, pageIndex, PageSize); } else { @@ -122,7 +123,7 @@ namespace BBWYB.Client.ViewModels } else { - productApiResponse = productService.GetProductList(SearchSpu, SearchProductName, SearchProductItem, pageIndex); + productApiResponse = productService.GetProductList(SearchSpu, SearchProductName, SearchProductItem, pageIndex, PageSize); } if (!productApiResponse.Success)