添加美团超市账号信息通知果园
This commit is contained in:
@@ -225,14 +225,14 @@ func (c *Auth2Controller) WeixinMPOAuth2() {
|
||||
}
|
||||
}
|
||||
if params.Block != "" {
|
||||
if moblie := params.Block[strings.LastIndex(params.Block, "=")+1:]; moblie != "" {
|
||||
if user, err := dao.GetUserByID(dao.GetDB(), "mobile", moblie); err == nil {
|
||||
if mobile := params.Block[strings.LastIndex(params.Block, "=")+1:]; mobile != "" {
|
||||
if user, err := dao.GetUserByID(dao.GetDB(), "mobile", mobile); err == nil {
|
||||
if user != nil {
|
||||
authInfo.AuthBindInfo.UserID = user.UserID
|
||||
authInfo.AuthBindInfo.AuthBind.UserID = user.UserID
|
||||
auth2.AddAuthBind(user, authInfo)
|
||||
} else {
|
||||
return retVal, errCode, fmt.Errorf("未查询到用户!mobile :%v", moblie)
|
||||
return retVal, errCode, fmt.Errorf("未查询到用户!mobile :%v", mobile)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -241,10 +241,9 @@ func (c *Auth2Controller) WeixinMPOAuth2() {
|
||||
params.Block = params.Block[:strings.LastIndex(params.Block, "?")]
|
||||
}
|
||||
redirectURL = fmt.Sprintf("%s?info=%s", params.Block, base64.StdEncoding.EncodeToString(utils.MustMarshal(callResult)))
|
||||
globals.SugarLogger.Debugf("===redirectURL=== %s", redirectURL)
|
||||
globals.SugarLogger.Debugf("===retVal=== %s", utils.Format4Output(retVal, false))
|
||||
return retVal, model.ErrorCodeIgnore, err
|
||||
})
|
||||
globals.SugarLogger.Debugf("redirectURL=====: %s", redirectURL)
|
||||
c.Redirect(redirectURL, http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user