package tik_tok import ( "fmt" "github.com/syyongx/php2go" "github.com/tidwall/gjson" ) func CsjpActivity(args map[string]string) (map[string]string, string) { params := map[string]interface{}{ "external_info": args["external_info"], "material_id": args["material_id"], } if args["extra_params"] != "" { params["extra_params"] = args["extra_params"] } send, err := CsjpSend(args["app_id"], args["app_secret"], "aggregate/h5", params) var data = map[string]string{} if err != nil { fmt.Println("抖音信息=====", send) return data, err.Error() } data["deeplink"] = gjson.Get(send, "data.deeplink").String() data["content"] = php2go.Base64Encode(gjson.Get(send, "data.share_command").String()) data["qr_code"] = gjson.Get(send, "data.qrcode.url").String() return data, "" }