1
This commit is contained in:
@@ -147,6 +147,7 @@ func RefreshWeixin2Token() (err error) {
|
||||
}
|
||||
} else {
|
||||
tokenInfo := getWX2TokenFromRemote(api.WeixinMiniAPI2.CBGetToken())
|
||||
globals.SugarLogger.Debugf("=================tokenInfo=1== := %s", utils.Format4Output(tokenInfo, false))
|
||||
if tokenInfo != nil {
|
||||
expireTimeStr = utils.Time2Str(time.Now().Add(-weixinTokenExpires))
|
||||
token = tokenInfo.Token
|
||||
@@ -375,7 +376,9 @@ func getWXTokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) {
|
||||
}
|
||||
|
||||
func getWX2TokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) {
|
||||
globals.SugarLogger.Debugf("=========bool : %s", utils.Format4Output(!globals.IsMainProductEnv() && globals.GetWeixinTokenKey != "" && globals.GetWeixinTokenURL != "", false))
|
||||
if !globals.IsMainProductEnv() && globals.GetWeixinTokenKey != "" && globals.GetWeixinTokenURL != "" {
|
||||
globals.SugarLogger.Debugf("=========globals.GetWeixin2TokenURL : %s", utils.Format4Output(globals.GetWeixin2TokenURL, false))
|
||||
tokenInfo = PollingRemotEvent(globals.GetWeixin2TokenURL, 0, map[string]interface{}{
|
||||
"oldToken": oldToken,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user