步步为盈
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.

64 lines
3.7 KiB

using BBWY.Client.Models;
using BBWY.Common.Http;
using BBWY.Common.Models;
using System.Collections.Generic;
using System.Net.Http;
namespace BBWY.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,Platform platform,string appKey,string appSecret,string appToken)
{
return SendRequest<IList<ProductSku>>(globalContext.BBYWApiHost,
"api/product/GetProductSkuList",
new
{
Spu = spu,
Sku = sku,
Platform = platform,
AppKey = appKey,
AppSecret = appSecret,
AppToken = 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);
}
}
}