diff --git a/business/auth2/authprovider/weixin/weixin_mini.go b/business/auth2/authprovider/weixin/weixin_mini.go index b6c13100b..b736d5d6b 100644 --- a/business/auth2/authprovider/weixin/weixin_mini.go +++ b/business/auth2/authprovider/weixin/weixin_mini.go @@ -2,7 +2,6 @@ package weixin import ( "errors" - "fmt" "strings" "git.rosy.net.cn/baseapi/platformapi/weixinapi" @@ -57,13 +56,13 @@ func (a *MiniAuther) DecryptData(authInfo *auth2.AuthInfo, jsCode, encryptedData if jsCode != "" { sessionInfo, err := getWxApp(appID).SNSCode2Session(jsCode) if err == nil { - if authBindEx, err := a.UnionFindAuthBind(AuthTypeMini, getWxApp(appID).GetAppID(), []string{AuthTypeMini}, sessionInfo.OpenID, "", nil); err == nil { - if authBindEx.UserID != authInfo.GetID() { - return "", fmt.Errorf("jsCode与token不匹配") - } - } else { - return "", err - } + // if authBindEx, err := a.UnionFindAuthBind(AuthTypeMini, getWxApp(appID).GetAppID(), []string{AuthTypeMini}, sessionInfo.OpenID, "", nil); err == nil { + // if authBindEx.UserID != authInfo.GetID() { + // return "", fmt.Errorf("jsCode与token不匹配") + // } + // } else { + // return "", err + // } sessionKey = sessionInfo.SessionKey } else { return "", err diff --git a/controllers/auth2.go b/controllers/auth2.go index ee210d23c..4d27cd9cb 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -6,8 +6,6 @@ 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" @@ -362,8 +360,8 @@ type UserInfoWithWeixin struct { func (c *Auth2Controller) GetUserByMiniInfo() { c.callGetUserByMiniInfo(func(params *tAuth2GetUserByMiniInfoParams) (retVal interface{}, errCode string, err error) { authInfo := &auth2.AuthInfo{} - result := api.Cacher.Get(params.Token) - utils.Map2StructByJson(result.(map[string]interface{}), &authInfo, false) + // result := api.Cacher.Get(params.Token) + // utils.Map2StructByJson(result.(map[string]interface{}), &authInfo, false) jsCode := "" if params.AuthType == weixin.AuthTypeMini { jsCode = GetComposedCode(&c.Controller, params.JsCode)