1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-08 22:52:27 +08:00

oauth2,jssdk

This commit is contained in:
wenzl
2016-09-15 01:27:28 +08:00
parent 3854bb0487
commit 4333691b37
21 changed files with 913 additions and 43 deletions

View File

@@ -21,6 +21,9 @@ type Context struct {
//accessTokenLock 读写锁 同一个AppID一个
accessTokenLock *sync.RWMutex
//jsapiTicket 读写锁 同一个AppID一个
jsApiTicketLock *sync.RWMutex
}
// Query returns the keyed url query value if it exists
@@ -37,3 +40,12 @@ func (ctx *Context) GetQuery(key string) (string, bool) {
}
return "", false
}
//SetJsApiTicket 设置jsApiTicket的lock
func (ctx *Context) SetJsApiTicketLock(lock *sync.RWMutex) {
ctx.jsApiTicketLock = lock
}
func (ctx *Context) GetJsApiTicketLock() *sync.RWMutex {
return ctx.jsApiTicketLock
}