This commit is contained in:
liwei1dao 2022-10-13 15:19:52 +08:00
commit 06e49d60df
3 changed files with 12 additions and 6 deletions

View File

@ -4,5 +4,5 @@ Website = "http://legu.cc"
Icon = "app.png" Icon = "app.png"
Name = "RobotGUI" Name = "RobotGUI"
ID = "cc.legu.app" ID = "cc.legu.app"
Version = "1.0.14" Version = "1.0.15"
Build = 17 Build = 18

View File

@ -147,6 +147,11 @@ func (this *toyUserInfo) dataListener() {
logrus.Error("unmarshal err") logrus.Error("unmarshal err")
return return
} }
if rsp.Data == nil {
logrus.Debug("没有用户数据返回")
}
this.setProp(1, common.USERINFO_SERVER, rsp.Data.Sid) this.setProp(1, common.USERINFO_SERVER, rsp.Data.Sid)
this.setProp(2, common.USERINFO_NAME, rsp.Data.Name) this.setProp(2, common.USERINFO_NAME, rsp.Data.Name)
this.setProp(3, common.USERINFO_AVATAR, rsp.Data.Avatar) this.setProp(3, common.USERINFO_AVATAR, rsp.Data.Avatar)

View File

@ -105,10 +105,11 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
//不是新账号 //不是新账号
if !isNewUser { if !isNewUser {
lastLoginTime := user.Logintime lastLoginTime := user.Logintime
user.Logintime = time.Now().Unix() update := map[string]interface{}{
user.Lastloginip = session.GetIP() "logintime": time.Now().Unix(),
update := utils.StructToMap(user) "lastloginip": session.GetIP(),
err = this.module.modelUser.Change(user.Uid, update) }
err = this.module.modelUser.ChangeList(user.Uid, user.Id, update)
if err != nil { if err != nil {
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return