将小程序获取ak的方式也抽象出来

This commit is contained in:
silenceper committed 2020-05-25 22:00:51 +08:00
1 parent b599e93c5b
commit 972dec0406
5 files changed
+15 -104

No files matched your search

+2 -8
View File
@@ -1,18 +1,12 @@
package context
import (
"sync"
"github.com/silenceper/wechat/v2/credential"
"github.com/silenceper/wechat/v2/miniprogram/config"
)
// Context struct
type Context struct {
*config.Config
//accessTokenLock 读写锁 同一个AppID一个
accessTokenLock *sync.RWMutex
//accessTokenFunc 自定义获取 access token 的方法
accessTokenFunc GetAccessTokenFunc
credential.AccessTokenHandle
}