diff --git a/controllers/auth2.go b/controllers/auth2.go index ebf40e638..22d1ab12d 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -341,7 +341,7 @@ type UserInfoWithWeixin struct { // @router /GetUserByMiniInfo [post] func (c *Auth2Controller) GetUserByMiniInfo() { c.callGetUserByMiniInfo(func(params *tAuth2GetUserByMiniInfoParams) (retVal interface{}, errCode string, err error) { - authInfo := &auth2.AuthInfo{} + authInfo, err := params.Ctx.GetV2AuthInfo() if err == nil { decryptedDataBase64, err2 := weixin.AutherObjMini.DecryptData(authInfo, GetComposedCode(&c.Controller, params.JsCode), params.Data, params.Iv) if err = err2; err == nil {