|
@@ -122,7 +122,7 @@ func BindWxUser(openid, mobile, email, code string, bindType, areaNum, registerP
|
|
|
|
|
|
|
|
|
func bindWxUser(openid, mobile, email string, areaNum, registerPlatform int) (userInfo UserInfo, errMsg string, err error) {
|
|
|
- source := int8(utils.USER_RECORD_CREATE_PLATFORM)
|
|
|
+ source := int8(utils.USER_RECORD_PLATFORM_YB)
|
|
|
if mobile == "" && email == "" {
|
|
|
err = errors.New("手机号或邮箱必填一个")
|
|
|
return
|
|
@@ -222,7 +222,7 @@ func bindWxUser(openid, mobile, email string, areaNum, registerPlatform int) (us
|
|
|
|
|
|
if userRecord.UserID == 0 {
|
|
|
|
|
|
- repeats, e := user_record.GetRepeatBindAccount(bindAccount, utils.USER_RECORD_CREATE_PLATFORM)
|
|
|
+ repeats, e := user_record.GetRepeatBindAccount(bindAccount, userRecord.UnionID)
|
|
|
if e != nil {
|
|
|
err = fmt.Errorf("获取重复的绑定账号数失败, err: %s", e.Error())
|
|
|
errMsg = "绑定异常"
|
|
@@ -230,7 +230,7 @@ func bindWxUser(openid, mobile, email string, areaNum, registerPlatform int) (us
|
|
|
}
|
|
|
if len(repeats) > 0 {
|
|
|
|
|
|
- if e = user_record.ClearRepeatBindAccount(bindAccount, utils.USER_RECORD_CREATE_PLATFORM); e != nil {
|
|
|
+ if e = user_record.ClearRepeatBindAccount(bindAccount, userRecord.UnionID); e != nil {
|
|
|
err = fmt.Errorf("重置重复的绑定账号失败, err: %s", e.Error())
|
|
|
errMsg = "绑定异常"
|
|
|
return
|