|
@@ -38,14 +38,14 @@ func ActivityProduct(args map[string]string) []TikTokGoods { |
|
|
//args = map[string]string{ |
|
|
//args = map[string]string{ |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appkey": "7136155008692651560", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
|
// "appSecret": "b132549f-f62c-491e-86f1-89af3658896a", |
|
|
// "activity_id": "349895", |
|
|
|
|
|
|
|
|
// "activity_id": "468745", |
|
|
// "search_type": "0", |
|
|
// "search_type": "0", |
|
|
// "sort_type": "1", |
|
|
// "sort_type": "1", |
|
|
// "page": "1", |
|
|
// "page": "1", |
|
|
// "count": "20", |
|
|
// "count": "20", |
|
|
// "acctoken": "21af5cb7-6a14-455f-90f7-6807b5e6655f", |
|
|
// "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"]) |
|
|
send, err := Send(args["appkey"], args["appSecret"], "alliance.colonelActivityProduct", params, args["acctoken"]) |
|
|
fmt.Println(send) |
|
|
fmt.Println(send) |
|
|
fmt.Println(err) |
|
|
fmt.Println(err) |
|
@@ -56,14 +56,14 @@ func ActivityProduct(args map[string]string) []TikTokGoods { |
|
|
} |
|
|
} |
|
|
var lmData struct { |
|
|
var lmData struct { |
|
|
Data struct { |
|
|
Data struct { |
|
|
Products []TikTokGoodsLm `json:"products"` |
|
|
|
|
|
|
|
|
Data []TikTokGoodsLm `json:"data"` |
|
|
} `json:"data"` |
|
|
} `json:"data"` |
|
|
} |
|
|
} |
|
|
err = json.Unmarshal([]byte(send), &lmData) |
|
|
err = json.Unmarshal([]byte(send), &lmData) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return goodsList |
|
|
return goodsList |
|
|
} |
|
|
} |
|
|
for _, v := range lmData.Data.Products { |
|
|
|
|
|
|
|
|
for _, v := range lmData.Data.Data { |
|
|
tmp := CommGoodsDetail(v) |
|
|
tmp := CommGoodsDetail(v) |
|
|
goodsList = append(goodsList, tmp) |
|
|
goodsList = append(goodsList, tmp) |
|
|
} |
|
|
} |
|
|