|
|
@@ -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"]} |
|
|
|