Merge branch 'feature/唯品尚'

This commit is contained in:
lzh 2025-05-28 15:23:58 +08:00
commit 9fbd72fa16
3 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ func setupMockServer(path string, method string, response string, t *testing.T)
} }
func newClientWithServer(ts *httptest.Server) *wps.WeiPinShangClient { func newClientWithServer(ts *httptest.Server) *wps.WeiPinShangClient {
return wps.NewWeiPinShangClient(wps.Config{ return wps.NewWeiPinShangClient(wps.WpsConfig{
BaseURL: wps.DevHost, BaseURL: wps.DevHost,
ChannelType: "AILEHUI", ChannelType: "AILEHUI",
Key: "f654ea5bde7635c3f46191191e5c4c8e", Key: "f654ea5bde7635c3f46191191e5c4c8e",

View File

@ -112,7 +112,7 @@ type GetGoodsdeptRes struct {
} }
type Goodsdept struct { type Goodsdept struct {
PageIndex string `json:"pageIndex"` PageIndex interface{} `json:"pageIndex"`
PageCount int `json:"pageCount"` PageCount int `json:"pageCount"`
DataCount int `json:"dataCount"` DataCount int `json:"dataCount"`
List []Goods `json:"list"` List []Goods `json:"list"`

View File

@ -32,7 +32,7 @@ const (
) )
// Config 客户端配置 // Config 客户端配置
type Config struct { type WpsConfig struct {
ChannelType string ChannelType string
Key string Key string
BaseURL string BaseURL string
@ -48,7 +48,7 @@ type WeiPinShangClient struct {
} }
// NewWeiPinShangClient 创建客户端 // NewWeiPinShangClient 创建客户端
func NewWeiPinShangClient(cfg Config) *WeiPinShangClient { func NewWeiPinShangClient(cfg WpsConfig) *WeiPinShangClient {
if cfg.ChannelType == "" { if cfg.ChannelType == "" {
cfg.ChannelType = "AILEHUI" cfg.ChannelType = "AILEHUI"
} }