mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-04 12:52:27 +08:00
将小程序获取ak的方式也抽象出来
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user