From a4a9309e972941363d0da7b5309af984dfc8a472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 22 Jun 2022 10:55:53 +0800 Subject: [PATCH] 1 --- platformapi/enterprise_wechat/wechat_client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platformapi/enterprise_wechat/wechat_client.go b/platformapi/enterprise_wechat/wechat_client.go index e5b5743e..1f6edbba 100644 --- a/platformapi/enterprise_wechat/wechat_client.go +++ b/platformapi/enterprise_wechat/wechat_client.go @@ -65,6 +65,12 @@ func (a *API) SetExpiresInTime(int2 int64) { a.expiresIn = time.Now().Unix() + int2 } +func (a *API) ReturnToken() string { + a.locker.Lock() + defer a.locker.Unlock() + return a.accessToken +} + // 获取access_token func (a *API) GetAccessToken() (tokenInfo *EnterpriseToken, err error) { parameter := make(map[string]interface{}, 2)