This commit is contained in:
richboo111
2022-08-09 13:46:00 +08:00
parent 06ab894aea
commit d65f1066ea
3 changed files with 5 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu
}
}
if err == nil && authBindEx == nil { //如果没有报错且没有找到一个认证方式创建无用户UserID为空的认证方式
globals.SugarLogger.Debug("没有找到一个认证方式")
authBindEx = &auth2.AuthBindEx{
AuthBind: model.AuthBind{
Type: curAuthType,
@@ -111,6 +112,8 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu
AuthID2: unionID,
},
}
globals.SugarLogger.Debug("输出一下authBindEx", authBindEx)
globals.SugarLogger.Debug("===================再输出一下authBind", authBind)
if authDetail != nil {
authBindEx.DetailData = string(utils.MustMarshal(authDetail))
}

View File

@@ -30,6 +30,7 @@ func (a *QRCodeAuther) VerifySecret(dummy, code string) (authBindEx *auth2.AuthB
if authBindEx, err = a.UnionFindAuthBind(AuthTypeQRCode, api.DingDingQRCodeAPI.GetAppID(), []string{AuthTypeStaff, AuthTypeQRCode}, userQRInfo.OpenID, userQRInfo.UnionID, userQRInfo); err == nil {
authBindEx.UserHint = &auth2.UserBasic{
Name: userQRInfo.Nickname,
//UserID: userQRInfo.,
}
}
}

View File

@@ -256,7 +256,7 @@ func (c *Auth2Controller) WeixinMPOAuth2() {
// @Param state query string false "微信回调的登录状态"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /DingDingOAuth2 [get]
// @router pay [get]
func (c *Auth2Controller) DingDingOAuth2() {
var (
redirectURL string