|
|
@@ -12,7 +12,7 @@ import ( |
|
|
|
"strings" |
|
|
|
) |
|
|
|
|
|
|
|
//抖音商品 |
|
|
|
// 抖音商品 |
|
|
|
func GoodsList(args map[string]string) []TikTokGoods { |
|
|
|
sortArr := map[string]map[string]string{ |
|
|
|
"default": {"search_type": "0", "sort_type": "0"}, |
|
|
@@ -85,7 +85,7 @@ func GoodsList(args map[string]string) []TikTokGoods { |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
|
|
|
|
//详情 |
|
|
|
// 详情 |
|
|
|
func GetDetailOld(args map[string]string) TikTokGoods { |
|
|
|
params := map[string]interface{}{"product_ids": []string{args["id"]}, "with_share_status": true} |
|
|
|
send, err := Send(args["appkey"], args["appSecret"], "alliance.materialsProductsDetails", params, args["acctoken"]) |
|
|
@@ -176,7 +176,20 @@ func GetDetailSku(args map[string]string, id int64) md.SkuData { |
|
|
|
} |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
|
|
|
|
func OpenGetDetailSku(args map[string]string, id int64) md.SkuData { |
|
|
|
params := map[string]interface{}{"product_id": id} |
|
|
|
send, err := OpenSendApi("alliance/product/skus/", params, zhios_third_party_utils.AnyToString(args["acctoken"])) |
|
|
|
var goodsList = md.SkuData{} |
|
|
|
product := gjson.Get(send, "data").String() |
|
|
|
if err != nil || product == "" { |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
respstr := strings.ReplaceAll(string(product), "\"pictures\":[]", "\"pictures\":{}") |
|
|
|
if err = json.Unmarshal([]byte(respstr), &goodsList); err != nil { |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
return goodsList |
|
|
|
} |
|
|
|
func OpenStoreDel(args map[string]interface{}) (string, error) { |
|
|
|
/** |
|
|
|
products []AddStoreProductInfo |
|
|
@@ -212,7 +225,7 @@ func OpenStoreList(args map[string]interface{}) (string, error) { |
|
|
|
return send, err |
|
|
|
} |
|
|
|
|
|
|
|
//详情 |
|
|
|
// 详情 |
|
|
|
func GetDetailMore(args map[string]string) *[]TikTokGoods { |
|
|
|
productIds := strings.Split(args["id"], ",") |
|
|
|
if len(productIds) == 0 { |
|
|
|