This commit is contained in:
苏尹岚
2021-03-18 10:14:06 +08:00
parent 111c6bbbb0
commit 1acb2624ba
8 changed files with 24 additions and 25 deletions

View File

@@ -274,10 +274,12 @@ func (a *API) ActMultiChannelQueryIDs(shopID string, baiduShopID int64, actType
params["query_activity_type"] = actType
result, err := a.AccessAPI("act.multi.channel.queryids", params)
if err == nil {
for _, v := range result.Data.(map[string]interface{})["activityIdList"].([]interface{}) {
actIDs = append(actIDs, utils.MustInterface2Int64(v))
if result.Data != nil {
for _, v := range result.Data.(map[string]interface{})["activityIdList"].([]interface{}) {
actIDs = append(actIDs, utils.MustInterface2Int64(v))
}
return actIDs, nil
}
return actIDs, nil
}
return actIDs, err
}

View File

@@ -48,9 +48,7 @@ func TestSkuGetItemsByCategoryId(t *testing.T) {
}
func TestSkuList(t *testing.T) {
result, err := api.SkuList(testShopID, &SkuListParams{
SkuID: 156411107107487,
})
result, err := api.SkuList("667544", &SkuListParams{})
if err != nil {
t.Fatal(err)
} else {