...
|
...
|
@@ -179,7 +179,12 @@ func LoginAuthByUCenter(account, password string) (protocol.LoginAuthToken, erro |
|
|
companyid int64
|
|
|
userdata *models.User
|
|
|
)
|
|
|
userdata, err = models.GetUserByPhone(account)
|
|
|
var uclientReturn *ucenter.ResponseLogin
|
|
|
uclientReturn, err = ucenter.RequestUCenterLogin(account, password)
|
|
|
if err != nil {
|
|
|
return logintoken, protocol.NewErrWithMessage("10021")
|
|
|
}
|
|
|
userdata, err = models.GetUserByUCenter(uclientReturn.Data.Id)
|
|
|
if err != nil {
|
|
|
log.Debug("GetUserByPhone(%s) err:%s", account, err)
|
|
|
return logintoken, protocol.NewErrWithMessage("10021")
|
...
|
...
|
@@ -207,11 +212,7 @@ func LoginAuthByUCenter(account, password string) (protocol.LoginAuthToken, erro |
|
|
} else {
|
|
|
companyid = companys[0].Id
|
|
|
}
|
|
|
var uclientReturn *ucenter.ResponseLogin
|
|
|
uclientReturn, err = ucenter.RequestUCenterLogin(account, password)
|
|
|
if err != nil {
|
|
|
return logintoken, protocol.NewErrWithMessage("10021")
|
|
|
}
|
|
|
|
|
|
//更新用户数据
|
|
|
userdata.Accid = uclientReturn.Data.Accid
|
|
|
userdata.Icon = uclientReturn.Data.Avatar
|
...
|
...
|
|