Bladeren bron

更新

master
huangjiajun 1 jaar geleden
bovenliggende
commit
b6e53af2f2
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. +4
    -0
      tik_tok/svc_tik_tok_goods.go

+ 4
- 0
tik_tok/svc_tik_tok_goods.go Bestand weergeven

@@ -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 {


Laden…
Annuleren
Opslaan