From 307d812b0a37178ab2e39b977735ef4f46318a9d Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 2 Dec 2023 15:22:30 +0800 Subject: [PATCH] test --- tik_tok/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tik_tok/api.go b/tik_tok/api.go index 4c96438..f4a772e 100644 --- a/tik_tok/api.go +++ b/tik_tok/api.go @@ -6,6 +6,7 @@ import ( "crypto/hmac" "crypto/sha256" "encoding/hex" + "fmt" "github.com/syyongx/php2go" "strings" "time" @@ -20,7 +21,7 @@ func Send(appkey, appSecret, method string, params map[string]interface{}, accto "app_key": appkey, "method": method, "param_json": paramJson, - "timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix()), + "timestamp": time.Now().Format("2006-01-02 15:04:05"), "v": "2", } sign := GetSign(appSecret, param) @@ -36,6 +37,8 @@ func Send(appkey, appSecret, method string, params map[string]interface{}, accto url += "?" + k + "=" + php2go.URLEncode(v) } } + fmt.Println(url) + fmt.Println(paramJson) data, err := zhios_third_party_utils.CurlPost(url, paramJson, nil) return string(data), err }