You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.7 KiB
49 lines
2.7 KiB
using BBWYB.Client.Models;
|
|
using BBWYB.Common.Http;
|
|
using BBWYB.Common.Models;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
|
|
namespace BBWYB.Client.APIServices
|
|
{
|
|
public class ProductService : BaseApiService, IDenpendency
|
|
{
|
|
public ProductService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { }
|
|
|
|
public ApiResponse<ProductListResponse> GetProductList(string spu, string productName, string productItem, int pageIndex)
|
|
{
|
|
return SendRequest<ProductListResponse>(globalContext.BBYWApiHost,
|
|
"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
|
|
},
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<IList<ProductSku>> GetProductSkuList(string spu, string sku)
|
|
{
|
|
return SendRequest<IList<ProductSku>>(globalContext.BBYWApiHost,
|
|
"api/product/GetProductSkuList",
|
|
new
|
|
{
|
|
Spu = spu,
|
|
Sku = sku,
|
|
Platform = globalContext.User.Shop.Platform,
|
|
AppKey = globalContext.User.Shop.AppKey,
|
|
AppSecret = globalContext.User.Shop.AppSecret,
|
|
AppToken = globalContext.User.Shop.AppToken
|
|
},
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
}
|
|
}
|
|
|