diff --git a/tik_tok/svc_tik_tok_team.go b/tik_tok/svc_tik_tok_team.go index d1d56d7..0e0f1e8 100644 --- a/tik_tok/svc_tik_tok_team.go +++ b/tik_tok/svc_tik_tok_team.go @@ -38,14 +38,14 @@ func ActivityProduct(args map[string]string) []TikTokGoods { //args = map[string]string{ // "appkey": "7136155008692651560", // "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", - // "activity_id": "349895", + // "activity_id": "468745", // "search_type": "0", // "sort_type": "1", // "page": "1", // "count": "20", // "acctoken": "21af5cb7-6a14-455f-90f7-6807b5e6655f", //} - params := map[string]interface{}{"activity_id": args["activity_id"], "search_type": args["search_type"], "sort_type": args["sort_type"], "page": args["page"], "count": args["count"]} + params := map[string]interface{}{"status": args["status"], "activity_id": args["activity_id"], "search_type": args["search_type"], "sort_type": args["sort_type"], "page": args["page"], "count": args["count"]} send, err := Send(args["appkey"], args["appSecret"], "alliance.colonelActivityProduct", params, args["acctoken"]) fmt.Println(send) fmt.Println(err) @@ -56,14 +56,14 @@ func ActivityProduct(args map[string]string) []TikTokGoods { } var lmData struct { Data struct { - Products []TikTokGoodsLm `json:"products"` + Data []TikTokGoodsLm `json:"data"` } `json:"data"` } err = json.Unmarshal([]byte(send), &lmData) if err != nil { return goodsList } - for _, v := range lmData.Data.Products { + for _, v := range lmData.Data.Data { tmp := CommGoodsDetail(v) goodsList = append(goodsList, tmp) } diff --git a/tik_tok/tik_tok_test.go b/tik_tok/tik_tok_test.go index 021eea9..6b7c29e 100644 --- a/tik_tok/tik_tok_test.go +++ b/tik_tok/tik_tok_test.go @@ -5,5 +5,5 @@ import ( ) func TestGoods(t *testing.T) { - Activity(map[string]string{}) + ActivityProduct(map[string]string{}) }