From 67235a8e2c1b1650c2287467e901eb8287564d84 Mon Sep 17 00:00:00 2001 From: Rick Date: Tue, 11 Jan 2022 20:54:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=93=E5=AD=98key?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth.go b/auth.go index 0794a8a..f060475 100644 --- a/auth.go +++ b/auth.go @@ -1,6 +1,8 @@ package weapp import ( + "fmt" + "github.com/medivhzhan/weapp/v3/request" ) @@ -60,7 +62,7 @@ type TokenResponse struct { // access_token 缓存 KEY func (cli *Client) tokenCacheKey() string { - return "weapp.access.token" + return fmt.Sprintf("weapp.%s.access.token", cli.appid) } func (cli *Client) GetAccessToken() (*TokenResponse, error) {