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.

50 lines
2.7 KiB

2 years ago
using BBWYB.Client.Models;
2 years ago
using BBWYB.Common.Http;
using BBWYB.Common.Models;
2 years ago
using System.Collections.Generic;
using System.Net.Http;
2 years ago
namespace BBWYB.Client.APIServices
2 years ago
{
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);
}
}
}