|
|
@@ -22,12 +22,14 @@ func GoodsCreatePid(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"]} |
|
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.kolProductShare", params, args["acctoken"]) |
|
|
|
fmt.Println(send) |
|
|
|
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.dy_deeplink").String() |
|
|
@@ -43,12 +45,15 @@ func ActConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
|
} |
|
|
|
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 { |
|
|
|
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() |
|
|
@@ -82,12 +87,13 @@ func LiveConvertUrl(args map[string]string) (map[string]string, string) { |
|
|
|
params["product_id"] = args["product_id"] |
|
|
|
} |
|
|
|
send, err := Send(args["appkey"], args["appSecret"], "buyin.instituteLiveShare", params, args["acctoken"]) |
|
|
|
fmt.Println(send) |
|
|
|
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.dy_deeplink").String() |
|
|
|