From 4a0eda62335bb15c04840395e39bad5ac903831d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 8 Apr 2021 14:23:45 +0800 Subject: [PATCH] aa --- controllers/auth2.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/auth2.go b/controllers/auth2.go index 22d1ab12d..cee287241 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -6,6 +6,8 @@ import ( "net/http" "strings" + "git.rosy.net.cn/jx-callback/globals/api" + "git.rosy.net.cn/baseapi/platformapi/weixinapi" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" @@ -341,7 +343,9 @@ type UserInfoWithWeixin struct { // @router /GetUserByMiniInfo [post] func (c *Auth2Controller) GetUserByMiniInfo() { c.callGetUserByMiniInfo(func(params *tAuth2GetUserByMiniInfoParams) (retVal interface{}, errCode string, err error) { - authInfo, err := params.Ctx.GetV2AuthInfo() + result := api.Cacher.Get(params.Token) + authInfo := result.(*auth2.AuthInfo) + // authInfo, err := api.Cacher.Get(params.Token) if err == nil { decryptedDataBase64, err2 := weixin.AutherObjMini.DecryptData(authInfo, GetComposedCode(&c.Controller, params.JsCode), params.Data, params.Iv) if err = err2; err == nil {