From c26804a4dda4f384745d2d41cff5a8a4f493f9a7 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 3 Jul 2023 17:47:09 +0800 Subject: [PATCH] wxlogin --- business/auth2/authprovider/defauther.go | 4 ++++ business/auth2/authprovider/weixin/weixin.go | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/business/auth2/authprovider/defauther.go b/business/auth2/authprovider/defauther.go index 119600db6..c77f91333 100644 --- a/business/auth2/authprovider/defauther.go +++ b/business/auth2/authprovider/defauther.go @@ -7,6 +7,8 @@ import ( "strings" "time" + "git.rosy.net.cn/jx-callback/globals" + "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/model" @@ -79,6 +81,8 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu if unionID != "" || openID != "" { // 且有unionID var authBindList []*model.AuthBind authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil) + globals.SugarLogger.Debugf("dao.IsNoRowsError authBindList=%s", utils.Format4Output(authBindList, false)) + globals.SugarLogger.Debugf("dao.IsNoRowsError openID=%s, unionID=%s", openID, unionID) if err != nil { return nil, err } diff --git a/business/auth2/authprovider/weixin/weixin.go b/business/auth2/authprovider/weixin/weixin.go index 32e60bb22..f773c78dd 100644 --- a/business/auth2/authprovider/weixin/weixin.go +++ b/business/auth2/authprovider/weixin/weixin.go @@ -2,7 +2,6 @@ package weixin import ( "errors" - "fmt" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/globals" @@ -73,8 +72,8 @@ func (a *Auther) VerifySecret(id, secret string) (authBindEx *auth2.AuthBindEx, state := id code := jsCode if state == "" { - temp := a.getAPI() - fmt.Printf("secret=%s,appid=%s", temp.GetSecret(), temp.GetAppID()) + //temp := a.getAPI() + //fmt.Printf("secret=%s,appid=%s", temp.GetSecret(), temp.GetAppID()) token, err2 := a.getAPI().SNSRetrieveToken(code) if err = err2; err == nil { openID = token.OpenID