From 16d7517280a64a05f9b3f427beb9f5c8a4bd62e5 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 9 Aug 2024 13:42:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BF=E5=B1=B1=E7=94=B2=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E7=94=9F=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tik_tok/csjp_life.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tik_tok/csjp_life.go b/tik_tok/csjp_life.go index 870b4c2..7dbe181 100644 --- a/tik_tok/csjp_life.go +++ b/tik_tok/csjp_life.go @@ -139,3 +139,33 @@ func CsjpLifeGetOrder(args map[string]string) (*[]csjp.CsjpOrder, int64, bool) { hasMore := gjson.Get(send, "data.has_more").Bool() return &list, cursor, hasMore } + +//4.5 活动转链接口 +func CsjpLifeGetActLink(args map[string]string) (map[string]string, error) { + params := map[string]interface{}{ + "distribution_activity_id": args["distribution_activity_idf"], + "command_external_info": args["command_external_info"], + } + if args["need_qr_code"] == "1" { + params["need_qr_code"] = true + } + if args["need_share_link"] == "1" { + params["need_share_link"] = true + } + if args["need_zlink"] == "1" { + params["need_zlink"] = true + } + if args["need_share_command"] == "1" { + params["need_share_command"] = true + } + send, err := CsjpSend(args["app_id"], args["app_secret"], "life/activity_command_share", params) + fmt.Println(send) + res := map[string]string{ + "dy_share_command": gjson.Get(send, "data.command_share_info.dy_share_command").String(), + "qr_code_url": gjson.Get(send, "data.command_share_info.qr_code_url").String(), + "share_link": gjson.Get(send, "data.command_share_info.share_link").String(), + "dy_deeplink": gjson.Get(send, "data.command_share_info.dy_deeplink").String(), + "dy_zlink": gjson.Get(send, "data.command_share_info.dy_zlink").String(), + } + return res, err +}