|
@@ -231,7 +231,7 @@ func GetUserTypeZhengShi(companyId int) (userType int, permissionStrnew, permiss
|
|
|
}
|
|
|
|
|
|
// 用户绑定
|
|
|
-func BindWxUser(mobile, countryCode string) (wxUser *models.WxUserItem, err error) {
|
|
|
+func BindWxUser(mobile, countryCode, inviteShareCode string) (wxUser *models.WxUserItem, err error) {
|
|
|
if mobile == "" {
|
|
|
err = errors.New("手机号或邮箱必填一个")
|
|
|
return
|
|
@@ -271,6 +271,9 @@ func BindWxUser(mobile, countryCode string) (wxUser *models.WxUserItem, err erro
|
|
|
user.UserId = int(tmpUserId)
|
|
|
userId = int(tmpUserId)
|
|
|
wxUser, err = models.GetWxUserItemByUserId(userId)
|
|
|
+ if inviteShareCode != "" { //记录分享来源
|
|
|
+ go AddCygxUserAdminShareHistory(wxUser, "login", "", inviteShareCode, 0) //记录分享来源
|
|
|
+ }
|
|
|
} else {
|
|
|
userId = wxUser.UserId
|
|
|
err = models.BindUserOutboundMobile(mobile, countryCode, userId)
|