1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package wpc
import (
"context"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
)
type brandWpc struct {
}
var Brand = brandWpc{}
type BrandListReq struct {
ChannelId string `json:"vopChannelId"`
UserNumber string `json:"userNumber"`
Page string `json:"page"`
PageSize string `json:"pageSize"`
AreaId string `json:"areaId,omitempty"`
AdIds string `json:"adIds,omitempty"`
}
type BrandListRes struct {
}
//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"`
Page string `json:"page"`
PageSize string `json:"pageSize"`
AreaId string `json:"areaId,omitempty"`
AdIds string `json:"adIds,omitempty"`
}
type BrandPreListRes 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"`
}
//PreList 预告品牌列表
func (*brandWpc) PreList(ctx context.Context, req BrandPreListReq) (res *BrandPreListRes, err error) {
method := "getPreBrandList"
req.ChannelId = server.AppKey
req.UserNumber = server.UserNumber
result, err := post(ctx, method, g.Map{
"request": req,
})
_ = gjson.New(result).Scan(&res)
return
}