From 89253cea7f489c5e50373aa1ccadacde60eb1dc4 Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 23 Dec 2022 18:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E6=96=B0token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- request/client.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/request/client.go b/request/client.go index 2afdea9..cec9bd5 100644 --- a/request/client.go +++ b/request/client.go @@ -67,13 +67,13 @@ func exec(action string, data string, result interface{}) error { respErr := RespErr{} json.Unmarshal(bytes, &respErr) if respErr.ErrorResponse.Code != "" { - if respErr.ErrorResponse.Code == "19" && config.SdkConfig.RefreshTokenCallback != nil { - token, err := RefreshToken() - if err != nil { - return err - } - config.SdkConfig.RefreshTokenCallback(token) - } + //if respErr.ErrorResponse.Code == "19" && config.SdkConfig.RefreshTokenCallback != nil { + // token, err := RefreshToken() + // if err != nil { + // return err + // } + // config.SdkConfig.RefreshTokenCallback(token) + //} return errors.New(respErr.ErrorResponse.ZhDesc) } mResp := map[string]resp{} @@ -291,6 +291,7 @@ func RefreshToken() (*config.Bearer, error) { if err != nil { return nil, err } + log.Println(string(data)) var b config.Bearer if err = json.Unmarshal(data, &b); err != nil { return nil, err