Parcourir la source

add reverse:for v1.0.6 更新

tags/v1.0.7
huangjiajun il y a 2 ans
Parent
révision
da3cd73dd7
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. +4
    -4
      tik_tok/svc_tik_tok_team.go
  2. +1
    -1
      tik_tok/tik_tok_test.go

+ 4
- 4
tik_tok/svc_tik_tok_team.go Voir le fichier

@@ -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)
}


+ 1
- 1
tik_tok/tik_tok_test.go Voir le fichier

@@ -5,5 +5,5 @@ import (
)

func TestGoods(t *testing.T) {
Activity(map[string]string{})
ActivityProduct(map[string]string{})
}

Chargement…
Annuler
Enregistrer