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