Browse Source

add reverse:for v1.0.6 更新

tags/v1.0.7
huangjiajun 2 years ago
parent
commit
da3cd73dd7
2 changed files with 5 additions and 5 deletions
  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 View File

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


+ 1
- 1
tik_tok/tik_tok_test.go View File

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


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

Loading…
Cancel
Save