作者 唐旭辉

屏蔽 密码校验

... ... @@ -202,23 +202,23 @@ func LoginAuthByUCenter(account, password string) (protocol.LoginAuthToken, erro
return logintoken, protocol.NewErrWithMessage("10022")
}
companyid = companys[0].Id
var uclientReturn *ucenter.ResponseLogin
uclientReturn, err = requestUCenterLogin(account, password)
if err != nil {
return logintoken, protocol.NewErrWithMessage("10021")
}
//更新用户数据
_ = uclientReturn
userdata.Accid = uclientReturn.Data.Accid
userdata.Icon = uclientReturn.Data.Avatar
userdata.ImToken = uclientReturn.Data.Imtoken
userdata.NickName = uclientReturn.Data.NickName
userdata.CsAccount = uclientReturn.Data.CustomerAccount
userdata.LastLoginTime = time.Now()
err = models.UpdateUserById(userdata, []string{"Accid", "Icon", "ImToken", "NickName", "CsAccount", "LastLoginTime"})
if err != nil {
log.Error("更新用户数据失败:%s", err)
}
// var uclientReturn *ucenter.ResponseLogin
// uclientReturn, err = requestUCenterLogin(account, password)
// if err != nil {
// return logintoken, protocol.NewErrWithMessage("10021")
// }
// //更新用户数据
// _ = uclientReturn
// userdata.Accid = uclientReturn.Data.Accid
// userdata.Icon = uclientReturn.Data.Avatar
// userdata.ImToken = uclientReturn.Data.Imtoken
// userdata.NickName = uclientReturn.Data.NickName
// userdata.CsAccount = uclientReturn.Data.CustomerAccount
// userdata.LastLoginTime = time.Now()
// err = models.UpdateUserById(userdata, []string{"Accid", "Icon", "ImToken", "NickName", "CsAccount", "LastLoginTime"})
// if err != nil {
// log.Error("更新用户数据失败:%s", err)
// }
logintoken, _ = GenerateAuthToken(userdata.Id, companyid)
return logintoken, err
}
... ...