huangjiajun 1 anno fa
parent
commit
b6e53af2f2
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      tik_tok/svc_tik_tok_goods.go

+ 4
- 0
tik_tok/svc_tik_tok_goods.go Vedi File

@@ -3,6 +3,7 @@ package tik_tok
import (
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
"encoding/json"
"fmt"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"strings"
@@ -58,6 +59,7 @@ func GoodsList(args map[string]string) []TikTokGoods {
}
send, err := Send(args["appkey"], args["appSecret"], "alliance.materialsProductsSearch", params, args["acctoken"])
var goodsList = make([]TikTokGoods, 0)
fmt.Println("抖音商品", args, send, err)
product := gjson.Get(send, "data.products").String()
if err != nil || product == "" {
return goodsList
@@ -69,6 +71,8 @@ func GoodsList(args map[string]string) []TikTokGoods {
}
err = json.Unmarshal([]byte(send), &lmData)
if err != nil {
fmt.Println("抖音商品1", err)

return goodsList
}
for _, v := range lmData.Data.Products {


Caricamento…
Annulla
Salva