|
@@ -19,21 +19,24 @@ func GoodsCreatePid(args map[string]string) map[string]string { |
|
|
data["pid"] = gjson.Get(send, "data.pid").String() |
|
|
data["pid"] = gjson.Get(send, "data.pid").String() |
|
|
return data |
|
|
return data |
|
|
} |
|
|
} |
|
|
func GoodsConvertUrl(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
|
func GoodsConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
params := map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"], "product_url": args["product_url"]} |
|
|
params := map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"], "product_url": args["product_url"]} |
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.kolProductShare", params, args["acctoken"]) |
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.kolProductShare", params, args["acctoken"]) |
|
|
fmt.Println(send) |
|
|
fmt.Println(send) |
|
|
var data = map[string]string{} |
|
|
var data = map[string]string{} |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
|
|
|
|
|
|
return data, err.Error() |
|
|
|
|
|
} |
|
|
|
|
|
if gjson.Get(send, "code").Int() != 10000 { |
|
|
|
|
|
return data, gjson.Get(send, "sub_msg").String() |
|
|
} |
|
|
} |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
|
|
|
|
|
|
return data |
|
|
|
|
|
|
|
|
return data, "" |
|
|
} |
|
|
} |
|
|
func ActConvertUrl(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
|
func ActConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
need_qr_code := "false" |
|
|
need_qr_code := "false" |
|
|
if args["need_qr_code"] == "1" { |
|
|
if args["need_qr_code"] == "1" { |
|
|
need_qr_code = "true" |
|
|
need_qr_code = "true" |
|
@@ -43,13 +46,16 @@ func ActConvertUrl(args map[string]string) map[string]string { |
|
|
fmt.Println(send) |
|
|
fmt.Println(send) |
|
|
var data = map[string]string{} |
|
|
var data = map[string]string{} |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
|
|
|
|
|
|
return data, err.Error() |
|
|
|
|
|
} |
|
|
|
|
|
if gjson.Get(send, "code").Int() != 10000 { |
|
|
|
|
|
return data, gjson.Get(send, "sub_msg").String() |
|
|
} |
|
|
} |
|
|
data["deeplink"] = gjson.Get(send, "data.deep_link").String() |
|
|
data["deeplink"] = gjson.Get(send, "data.deep_link").String() |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.share_command").String()) |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.share_command").String()) |
|
|
data["qr_code"] = gjson.Get(send, "data.qrcode.url").String() |
|
|
data["qr_code"] = gjson.Get(send, "data.qrcode.url").String() |
|
|
|
|
|
|
|
|
return data |
|
|
|
|
|
|
|
|
return data, "" |
|
|
} |
|
|
} |
|
|
func LiveCreatePid(args map[string]string) map[string]string { |
|
|
func LiveCreatePid(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
@@ -63,7 +69,7 @@ func LiveCreatePid(args map[string]string) map[string]string { |
|
|
data["pid"] = gjson.Get(send, "data.pid").String() |
|
|
data["pid"] = gjson.Get(send, "data.pid").String() |
|
|
return data |
|
|
return data |
|
|
} |
|
|
} |
|
|
func LiveConvertUrl(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
|
func LiveConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
|
|
|
|
|
|
params := map[string]interface{}{"pid_info": map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"]}, "buyin_id": args["open_id"]} |
|
|
params := map[string]interface{}{"pid_info": map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"]}, "buyin_id": args["open_id"]} |
|
|
if args["need_qr_code"] == "1" { |
|
|
if args["need_qr_code"] == "1" { |
|
@@ -79,27 +85,33 @@ func LiveConvertUrl(args map[string]string) map[string]string { |
|
|
fmt.Println(send) |
|
|
fmt.Println(send) |
|
|
var data = map[string]string{} |
|
|
var data = map[string]string{} |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
|
|
|
|
|
|
return data, err.Error() |
|
|
|
|
|
} |
|
|
|
|
|
if gjson.Get(send, "code").Int() != 10000 { |
|
|
|
|
|
return data, gjson.Get(send, "sub_msg").String() |
|
|
} |
|
|
} |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
|
|
|
|
|
|
return data |
|
|
|
|
|
|
|
|
return data, "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func RegimentalConvertUrl(args map[string]string) map[string]string { |
|
|
|
|
|
|
|
|
func RegimentalConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
|
|
|
|
|
|
params := map[string]interface{}{"pid_info": map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"]}, "open_id": args["open_id"]} |
|
|
params := map[string]interface{}{"pid_info": map[string]interface{}{"pid": args["pid"], "external_info": args["external_info"]}, "open_id": args["open_id"]} |
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.instituteLiveShare", params, args["acctoken"]) |
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.instituteLiveShare", params, args["acctoken"]) |
|
|
fmt.Println(send) |
|
|
fmt.Println(send) |
|
|
var data = map[string]string{} |
|
|
var data = map[string]string{} |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return data |
|
|
|
|
|
|
|
|
return data, err.Error() |
|
|
|
|
|
} |
|
|
|
|
|
if gjson.Get(send, "code").Int() != 10000 { |
|
|
|
|
|
return data, gjson.Get(send, "sub_msg").String() |
|
|
} |
|
|
} |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["deeplink"] = gjson.Get(send, "data.dy_deeplink").String() |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["content"] = php2go.Base64Encode(gjson.Get(send, "data.dy_password").String()) |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
data["qr_code"] = gjson.Get(send, "data.qr_code.url").String() |
|
|
|
|
|
|
|
|
return data |
|
|
|
|
|
|
|
|
return data, "" |
|
|
} |
|
|
} |