From 3f867b1ba9cef67c8510aa052d4907ae8c089673 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 31 Oct 2024 11:11:52 +0800 Subject: [PATCH] 1 --- tik_tok/svc_tik_tok_goods.go | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/tik_tok/svc_tik_tok_goods.go b/tik_tok/svc_tik_tok_goods.go index 1daefdf..27bc2e5 100644 --- a/tik_tok/svc_tik_tok_goods.go +++ b/tik_tok/svc_tik_tok_goods.go @@ -191,11 +191,28 @@ func OpenGetDetailSku(args map[string]string, id int64) md.SkuData { return goodsList } +func OpenGoodsCate(args map[string]interface{}) (string, error) { + /** + products []AddStoreProductInfo + 商品信息,最多20个商品 + product_id int64 3450632721376902816 商品ID + promotion_id int64 3450632721374033833 推广ID + need_hide bool false 是否隐藏(true代表隐藏,false代表显示) + pick_extra string fasdfkl 自定义参数,携带到订单(只允许 数字、字母和_,限制长度为20) + keep_picksource bool true 是否保留商品链接原有选品来源,默认不保留(加橱窗时默认会生成新的选品来源参数覆盖旧参数,转链的自定义参数也会失效,此时选品来源为当前加橱窗应用),keep_picksource 为 true 时保留原有选品来源 + */ + fmt.Println(args) + params := map[string]interface{}{"parent_id": 0} + send, err := OpenSendApi("alliance/materials/product/category/", params, zhios_third_party_utils.AnyToString(args["acctoken"])) + fmt.Println(send) + fmt.Println(err) + return send, err +} func OpenKolGetDetailSku(args map[string]string, id int64) md.SkuData { params := map[string]interface{}{"product_id": id} send, err := OpenSendApi("alliance/product/kol/skus/?open_id="+zhios_third_party_utils.AnyToString(args["open_id"]), params, zhios_third_party_utils.AnyToString(args["acctoken"])) var goodsList = md.SkuData{} - product := gjson.Get(send, "data").String() + product := gjson.Get(send, "data.data").String() if err != nil || product == "" { return goodsList }