|
|
@@ -62,6 +62,30 @@ func ActConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
|
|
|
|
|
return data, "" |
|
|
|
} |
|
|
|
func DkActConvertUrl(args map[string]string) (map[string]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"], "material_id": args["material_id"], "need_qr_code": need_qr_code} |
|
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.doukeActivityShare", params, args["acctoken"]) |
|
|
|
var data = map[string]string{} |
|
|
|
if err != nil { |
|
|
|
fmt.Println("抖音信息=====", send) |
|
|
|
|
|
|
|
return data, err.Error() |
|
|
|
} |
|
|
|
if gjson.Get(send, "code").Int() != 10000 { |
|
|
|
fmt.Println("抖音信息=====", send) |
|
|
|
|
|
|
|
return data, gjson.Get(send, "sub_msg").String() |
|
|
|
} |
|
|
|
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"]} |
|
|
|