|
|
@@ -96,3 +96,29 @@ func ProductUrl(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
return data |
|
|
|
} |
|
|
|
|
|
|
|
func TeamOrder(args map[string]string) []TikTokTeamOrder { |
|
|
|
params := map[string]interface{}{ |
|
|
|
"size": args["size"], |
|
|
|
"cursor": args["cursor"], |
|
|
|
"order_ids": args["order_ids"], |
|
|
|
} |
|
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.instituteOrderColonel", params, args["acctoken"]) |
|
|
|
fmt.Println(send) |
|
|
|
fmt.Println(err) |
|
|
|
var goodsList = make([]TikTokTeamOrder, 0) |
|
|
|
product := gjson.Get(send, "data").String() |
|
|
|
if err != nil || product == "" { |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
var lmData struct { |
|
|
|
Data struct { |
|
|
|
Orders []TikTokTeamOrder `json:"orders"` |
|
|
|
} `json:"data"` |
|
|
|
} |
|
|
|
err = json.Unmarshal([]byte(send), &lmData) |
|
|
|
if err != nil { |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
return lmData.Data.Orders |
|
|
|
} |