wxlogin
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user