Browse Source

add reverse:for v1.1.3 抖音接口

tags/v1.1.3
huangjiajun 2 years ago
parent
commit
3fd22e6ad1
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      tik_tok/svc_tik_tok_goods.go

+ 6
- 1
tik_tok/svc_tik_tok_goods.go View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"strings"
)

//抖音商品
@@ -79,7 +80,11 @@ func GoodsList(args map[string]string) []TikTokGoods {

//详情
func GetDetail(args map[string]string) TikTokGoods {
params := map[string]interface{}{"product_ids": []string{args["id"]}, "with_share_status": true}
productIds := strings.Split(args["id"], ",")
if len(productIds) == 0 {
return TikTokGoods{}
}
params := map[string]interface{}{"product_ids": productIds, "with_share_status": true}
send, err := Send(args["appkey"], args["appSecret"], "alliance.materialsProductsDetails", params, args["acctoken"])
var goodsList = TikTokGoods{}
product := gjson.Get(send, "data.products").String()


Loading…
Cancel
Save