From 8b245587bb92008546d8f194d7a98a7a08b1977d Mon Sep 17 00:00:00 2001 From: zhongqiang <15375399426> Date: Fri, 27 Jun 2025 17:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A4=E6=98=93=E6=89=80=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jtt_tool/jtt_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jtt_tool/jtt_client.go b/jtt_tool/jtt_client.go index 628ece6..563b943 100644 --- a/jtt_tool/jtt_client.go +++ b/jtt_tool/jtt_client.go @@ -50,7 +50,7 @@ func (j *JttClient) FindUserForTokenMessage(address string) (res *FindUserForTok paramMap["publicKey"] = j.PublicKey paramMap["address"] = address - postRes, err := j.JttPost(paramMap) + postRes, err := j.JttPost("/findUserForTokenMessage", paramMap) if err != nil { return } @@ -71,6 +71,7 @@ func (j *JttClient) FindUserForTokenMessage(address string) (res *FindUserForTok } type FindUserForTokenMessageRes struct { + Code int `json:"code"` Data *Data `json:"data"` } @@ -85,11 +86,11 @@ type UserToken struct { WalletAddress string `json:"walletAddress"` } -func (j *JttClient) JttPost(paramMap map[string]any) (res []byte, err error) { +func (j *JttClient) JttPost(url string, paramMap map[string]any) (res []byte, err error) { bodyByte, _ := json.Marshal(paramMap) - req, err := http.NewRequest(http.MethodPost, j.ApiUrl+"/findUserForTokenMessage", bytes.NewBuffer(bodyByte)) + req, err := http.NewRequest(http.MethodPost, j.ApiUrl+url, bytes.NewBuffer(bodyByte)) if err != nil { return }