获取微信小程序码

This commit is contained in:
苏尹岚
2020-02-24 11:41:29 +08:00
parent b1a2420e42
commit 5aa75aea38

View File

@@ -3,6 +3,8 @@ package controllers
import (
"encoding/base64"
"git.rosy.net.cn/jx-callback/business/jxutils/tasks"
"git.rosy.net.cn/jx-callback/business/jxstore/event"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/globals/api"
@@ -69,8 +71,10 @@ func (c *EventController) GetCheckVendorCookie() {
// @router /GetWeixinUnlimited [post]
func (c *EventController) GetWeixinUnlimited() {
c.callGetWeixinUnlimited(func(params *tEventGetWeixinUnlimitedParams) (retVal interface{}, errCode string, err error) {
api.WeixinMiniAPI2.CBRetrieveToken()
retVal, err = api.WeixinMiniAPI2.GetUnlimited(params.Scene, params.Page)
retVal = base64.StdEncoding.EncodeToString(retVal.([]byte))
tasks.RefreshWeixinToken()
return retVal, "", err
})
}