wxlogin
This commit is contained in:
@@ -7,8 +7,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/business/auth2"
|
"git.rosy.net.cn/jx-callback/business/auth2"
|
||||||
"git.rosy.net.cn/jx-callback/business/model"
|
"git.rosy.net.cn/jx-callback/business/model"
|
||||||
@@ -80,14 +78,25 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu
|
|||||||
} else if dao.IsNoRowsError(err) { // 直接找不到,尝试unionID
|
} else if dao.IsNoRowsError(err) { // 直接找不到,尝试unionID
|
||||||
if unionID != "" || openID != "" { // 且有unionID
|
if unionID != "" || openID != "" { // 且有unionID
|
||||||
var authBindList []*model.AuthBind
|
var authBindList []*model.AuthBind
|
||||||
authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil)
|
//authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil)
|
||||||
globals.SugarLogger.Debugf("dao.IsNoRowsError authBindList=%s", utils.Format4Output(authBindList, false))
|
//if err != nil {
|
||||||
globals.SugarLogger.Debugf("dao.IsNoRowsError openID=%s, unionID=%s", openID, unionID)
|
// return nil, err
|
||||||
if err != nil {
|
//}
|
||||||
globals.SugarLogger.Debugf("dao.IsNoRowsError err=%v", err)
|
//if len(authBindList) > 0 { // 通过unionID找到至少一个认证方式
|
||||||
return nil, err
|
// authBind = authBindList[0]
|
||||||
}
|
// authBind.Type = curAuthType
|
||||||
if len(authBindList) > 0 { // 通过unionID找到至少一个认证方式
|
// authBind.TypeID = curAuthTypeID
|
||||||
|
// authBind.AuthID = openID
|
||||||
|
// if authDetail != nil {
|
||||||
|
// authBind.DetailData = string(utils.MustMarshal(authDetail))
|
||||||
|
// }
|
||||||
|
// authBindEx = &auth2.AuthBindEx{
|
||||||
|
// AuthBind: *authBind,
|
||||||
|
// }
|
||||||
|
// a.UnbindAuth(authBind.UserID, curAuthType, curAuthTypeID, model.AdminName)
|
||||||
|
// err = a.AddAuthBind(authBindEx, model.AdminName) // 自动绑定
|
||||||
|
//}
|
||||||
|
if authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil); err == nil && len(authBindList) > 0 { // 通过unionID找到至少一个认证方式
|
||||||
authBind = authBindList[0]
|
authBind = authBindList[0]
|
||||||
authBind.Type = curAuthType
|
authBind.Type = curAuthType
|
||||||
authBind.TypeID = curAuthTypeID
|
authBind.TypeID = curAuthTypeID
|
||||||
|
|||||||
Reference in New Issue
Block a user