This commit is contained in:
苏尹岚
2021-04-08 14:49:42 +08:00
parent d8e891a30e
commit 3cf833dac7
2 changed files with 1 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ func (a *MiniAuther) DecryptData(authInfo *auth2.AuthInfo, jsCode, encryptedData
}
} else {
if authInfo.AuthBindInfo.Type != AuthTypeMini {
return "", ErrAuthTypeShouldBeMini
// return "", ErrAuthTypeShouldBeMini
}
sessionKey = authInfo.AuthBindInfo.UserData.(string)
}

View File

@@ -346,7 +346,6 @@ func (c *Auth2Controller) GetUserByMiniInfo() {
authInfo := &auth2.AuthInfo{}
result := api.Cacher.Get(params.Token)
utils.Map2StructByJson(result.(map[string]interface{}), &authInfo, false)
fmt.Println("1111111111111", utils.Format4Output(authInfo, true))
// 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)