diff --git a/weipinshang/goods_api_test.go b/weipinshang/goods_api_test.go index 401985a..5d56b6a 100644 --- a/weipinshang/goods_api_test.go +++ b/weipinshang/goods_api_test.go @@ -19,7 +19,7 @@ func setupMockServer(path string, method string, response string, t *testing.T) } func newClientWithServer(ts *httptest.Server) *wps.WeiPinShangClient { - return wps.NewWeiPinShangClient(wps.Config{ + return wps.NewWeiPinShangClient(wps.WpsConfig{ BaseURL: wps.DevHost, ChannelType: "AILEHUI", Key: "f654ea5bde7635c3f46191191e5c4c8e", diff --git a/weipinshang/model.go b/weipinshang/model.go index 0919591..bf9121c 100644 --- a/weipinshang/model.go +++ b/weipinshang/model.go @@ -112,10 +112,10 @@ type GetGoodsdeptRes struct { } type Goodsdept struct { - PageIndex string `json:"pageIndex"` - PageCount int `json:"pageCount"` - DataCount int `json:"dataCount"` - List []Goods `json:"list"` + PageIndex interface{} `json:"pageIndex"` + PageCount int `json:"pageCount"` + DataCount int `json:"dataCount"` + List []Goods `json:"list"` } // GetDetailsGoodsReq 获取批量商品详情接口 diff --git a/weipinshang/wei_pin_shang_client.go b/weipinshang/wei_pin_shang_client.go index 8632207..e92c917 100644 --- a/weipinshang/wei_pin_shang_client.go +++ b/weipinshang/wei_pin_shang_client.go @@ -32,7 +32,7 @@ const ( ) // Config 客户端配置 -type Config struct { +type WpsConfig struct { ChannelType string Key string BaseURL string @@ -48,7 +48,7 @@ type WeiPinShangClient struct { } // NewWeiPinShangClient 创建客户端 -func NewWeiPinShangClient(cfg Config) *WeiPinShangClient { +func NewWeiPinShangClient(cfg WpsConfig) *WeiPinShangClient { if cfg.ChannelType == "" { cfg.ChannelType = "AILEHUI" }