diff --git a/tik_tok/svc_tik_tok_convert.go b/tik_tok/svc_tik_tok_convert.go index 8abcbf6..478032b 100644 --- a/tik_tok/svc_tik_tok_convert.go +++ b/tik_tok/svc_tik_tok_convert.go @@ -33,6 +33,24 @@ func GoodsConvertUrl(args map[string]string) map[string]string { return data } +func ActConvertUrl(args map[string]string) map[string]string { + need_qr_code := "false" + if args["need_qr_code"] == "1" { + need_qr_code = "true" + } + params := map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"], "activity_id": args["activity_id"], "mix_activity_id": args["mix_activity_id"], "need_qr_code": need_qr_code} + send, err := Send(args["appkey"], args["appSecret"], "buyin.activityShareConvert", params, args["acctoken"]) + fmt.Println(send) + var data = map[string]string{} + if err != nil { + return data + } + data["deeplink"] = gjson.Get(send, "data.deep_link").String() + data["content"] = php2go.Base64Encode(gjson.Get(send, "data.share_command").String()) + data["qr_code"] = gjson.Get(send, "data.qrcode.url").String() + + return data +} func LiveCreatePid(args map[string]string) map[string]string { params := map[string]interface{}{"media_type": "4", "media_name": args["media_name"], "site_name": args["site_name"]}