liuxiaolong
2020-08-11 6b89476c39e27cc309cb085b95c7ace24cfc2ed0
service/userService.go
@@ -16,7 +16,7 @@
}
func (sv *UserService) Login(phoneNum, code string) (bool,*vo.UserInfo,error) {
func (sv *UserService) Login(phoneNum, code, cid string) (bool,*vo.UserInfo,error) {
   if verifyCode(phoneNum, code) {
      carSv := NewCarService()
@@ -54,6 +54,13 @@
                  plateNos = append(plateNos, up.PlateNo)
               }
            }
            //客户端cid绑定别名
            if cid != "" {
               go func() {
                  bindR, bindE := BindAlias(cid, phoneNum)
                  fmt.Println("bind cid:",cid, "phoneNum:",phoneNum,"result:", bindR, "err:", bindE)
               }()
            }
            return true, &vo.UserInfo{
               UserId: u.Id,
               PhoneNum: phoneNum,
@@ -72,6 +79,13 @@
               plateNos = append(plateNos, up.PlateNo)
            }
         }
         //客户端cid绑定别名
         if cid != "" {
            go func() {
               bindR, bindE := BindAlias(cid, phoneNum)
               fmt.Println("bind cid:",cid, "phoneNum:",phoneNum,"result:", bindR, "err:", bindE)
            }()
         }
         return true, &vo.UserInfo{
            UserId: tmpUser.Id,
            PhoneNum: phoneNum,