提交 93683086 authored 作者: 赵雪如's avatar 赵雪如

唯品会

上级 4cb2056f
......@@ -21,20 +21,91 @@ type BrandListReq struct {
}
type BrandListRes struct {
ReturnCode string `json:"returnCode"`
Result struct {
PageTotal int `json:"pageTotal"`
PageIndex int `json:"pageIndex"`
TotalNum int `json:"totalNum"`
PageSize int `json:"pageSize"`
BrandList []struct {
AdId string
BrandName string
BrandImage string
SellTimeFrom string
SellTimeTo string
BrandDesc string
CommissionRatio string
PreTime string
Ext1 string
Ext2 g.MapStrStr
Notice string
Goods []struct {
GoodId string
GoodImage string
BrandCnName string
BrandEnName string
Logo string
Sn string
Color string
Material string
CatNameOne string
CatNameTwo string
CatNameThree string
GoodFullId string
GoodOnline int
VendorProductId int64
IsMp bool
CatIdOne string
CatIdTwo string
CatIdThree string
VendorSn string
GoodsBrandId string
SizeTableJson []string
DcImageURLs []string
Sizes []struct {
SizeName string
VipshopPrice string
MarketPrice string
Stock bool
SizeId int64
BuyMinNum string
BuyMaxNum string
Commission string
SuggestAddPrice string
SuggestPrice string
SkuId int64
LimitBuyFlag bool
}
}
StoreQualificationImgList []struct {
QualificationType string
ImgUrl string
LicenseNumber string
}
AdCategoryList []struct {
CateId int64
CateName string
}
CouponList []struct {
CouponName string
CouponDesc string
ActivateBeginTime string
ActivateEndTime string
SurplusSecond int64
UseSurplusSecond int64
Fav string
CouponNo string
UseBeginTime string
UseEndTime string
ShareFav string
Buy string
Status int
ShareType int
Type int
}
} `json:"brandList"`
} `json:"result"`
}
//List 列表
func (*brandWpc) List(ctx context.Context, req BrandListReq) (res *BrandListRes, err error) {
method := "getBrandList"
req.ChannelId = server.AppKey
req.UserNumber = server.UserNumber
result, err := post(ctx, method, g.Map{
"request": req,
})
_ = gjson.New(result).Scan(&res)
return
}
type BrandPreListReq struct {
ChannelId string `json:"vopChannelId"`
UserNumber string `json:"userNumber"`
......@@ -131,6 +202,18 @@ type BrandPreListRes struct {
} `json:"result"`
}
//List 列表
func (*brandWpc) List(ctx context.Context, req BrandListReq) (res *BrandListRes, err error) {
method := "getBrandList"
req.ChannelId = server.AppKey
req.UserNumber = server.UserNumber
result, err := post(ctx, method, g.Map{
"request": req,
})
_ = gjson.New(result).Scan(&res)
return
}
//PreList 预告品牌列表
func (*brandWpc) PreList(ctx context.Context, req BrandPreListReq) (res *BrandPreListRes, err error) {
method := "getPreBrandList"
......@@ -142,3 +225,4 @@ func (*brandWpc) PreList(ctx context.Context, req BrandPreListReq) (res *BrandPr
_ = gjson.New(result).Scan(&res)
return
}
......@@ -22,8 +22,52 @@ type GoodsListReq struct {
}
type GoodsListRes struct {
ReturnCode string `json:"returnCode"`
ReturnMessage string `json:"returnMessage"`
ReturnCode string `json:"returnCode"`
Result struct {
PageTotal int `json:"pageTotal"`
PageIndex int `json:"pageIndex"`
TotalNum int `json:"totalNum"`
PageSize int `json:"pageSize"`
Goods []struct {
GoodId string
GoodImage string
BrandCnName string
BrandEnName string
Logo string
Sn string
Color string
Material string
CatNameOne string
CatNameTwo string
CatNameThree string
GoodFullId string
GoodOnline int
VendorProductId int64
IsMp bool
CatIdOne string
CatIdTwo string
CatIdThree string
VendorSn string
GoodsBrandId string
SizeTableJson []string
DcImageURLs []string
Sizes []struct {
SizeName string
VipshopPrice string
MarketPrice string
Stock bool
SizeId int64
BuyMinNum string
BuyMaxNum string
Commission string
SuggestAddPrice string
SuggestPrice string
SkuId int64
LimitBuyFlag bool
}
GoodBigImage []string
} `json:"goods"`
} `json:"result"`
}
//List 列表
......@@ -82,12 +126,57 @@ type GoodsDetailReq struct {
}
type GoodsDetailRes struct {
ReturnCode string `json:"returnCode"`
ReturnMessage string `json:"returnMessage"`
Result struct {
} `json:"result"`
ReturnCode string `json:"returnCode"`
Result []GoodsDetaiParam `json:"result"`
}
type GoodsDetaiParam struct {
GoodId string
GoodImage string
GoodName string
BrandCnName string
BrandEnName string
Logo string
Sn string
Color string
Material string
CatNameOne string
CatNameTwo string
CatNameThree string
GoodFullId string
GoodOnline int
VendorProductId int64
IsMp bool
CatIdOne string
CatIdTwo string
CatIdThree string
VendorSn string
GoodsBrandId string
SizeTableJson []string
DcImageURLs []string
GoodBigImage []string
Sizes []struct {
SizeName string
VipshopPrice string
MarketPrice string
Stock bool
SizeId int64
BuyMinNum string
BuyMaxNum string
Commission string
SuggestAddPrice string
SuggestPrice string
SkuId int64
LimitBuyFlag bool
}
GoodProps []struct{
Name string
Value string
}
IsAllNoStock bool
IsSupportReturn bool
TaxRate string
TaxCode string
}
//Detail 详情
func (*goodsWpc) Detail(ctx context.Context, req GoodsDetailReq) (res *GoodsDetailRes, err error) {
method := "getGoodsDetail"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论