Browse Source

add reverse:for v1.1.10 输出错误信息

tags/v1.1.10
huangjiajun 2 years ago
parent
commit
ca0e9ef129
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      tik_tok/svc_tik_tok_convert.go

+ 9
- 3
tik_tok/svc_tik_tok_convert.go View File

@@ -22,12 +22,14 @@ func GoodsCreatePid(args map[string]string) map[string]string {
func GoodsConvertUrl(args map[string]string) (map[string]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)
var data = map[string]string{} var data = map[string]string{}
if err != nil { if err != nil {
fmt.Println("抖音信息=====", send)
return data, err.Error() return data, err.Error()
} }
if gjson.Get(send, "code").Int() != 10000 { if gjson.Get(send, "code").Int() != 10000 {
fmt.Println("抖音信息=====", send)

return data, gjson.Get(send, "sub_msg").String() 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()
@@ -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} 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"]) send, err := Send(args["appkey"], args["appSecret"], "buyin.activityShareConvert", params, args["acctoken"])
fmt.Println(send)
var data = map[string]string{} var data = map[string]string{}
if err != nil { if err != nil {
fmt.Println("抖音信息=====", send)

return data, err.Error() return data, err.Error()
} }
if gjson.Get(send, "code").Int() != 10000 { if gjson.Get(send, "code").Int() != 10000 {
fmt.Println("抖音信息=====", send)

return data, gjson.Get(send, "sub_msg").String() 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()
@@ -82,12 +87,13 @@ func LiveConvertUrl(args map[string]string) (map[string]string, string) {
params["product_id"] = args["product_id"] params["product_id"] = args["product_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)
var data = map[string]string{} var data = map[string]string{}
if err != nil { if err != nil {
fmt.Println("抖音信息=====", send)
return data, err.Error() return data, err.Error()
} }
if gjson.Get(send, "code").Int() != 10000 { if gjson.Get(send, "code").Int() != 10000 {
fmt.Println("抖音信息=====", send)
return data, gjson.Get(send, "sub_msg").String() 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()


Loading…
Cancel
Save