浏览代码

Merge branch 'yb/1.1' of hongze/hongze_yb into master

hsun 3 年之前
父节点
当前提交
275a085477
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      services/user/user.go

+ 5 - 2
services/user/user.go

@@ -238,12 +238,15 @@ QUERY_WX_USER:
 				if platformUser.CountryCode != "" {
 					countryCode, _ = strconv.Atoi(platformUser.CountryCode)
 				}
-				_, _, tempErr, errMsg := BindWxUser(openId, platformUser.Mobile, platformUser.Email, "", 3, countryCode, 1)
+				tempToken, tempUser, tempErr, _ := BindWxUser(openId, platformUser.Mobile, platformUser.Email, "", 3, countryCode, 1)
 				if tempErr != nil {
-					err = errors.New("自动绑定公众号用户失败" + errMsg)
+					err = errors.New("自动绑定公众号用户失败,Err:" + tempErr.Error())
 					return
 				}
+				token = tempToken
+				userId = int(tempUser.UserID)
 				isBind = true
+				return
 			}
 		}
 	} else if wxUserErr != nil {