diff --git a/cmd/v2/FyneApp.toml b/cmd/v2/FyneApp.toml index 600fd2175..dbf37401c 100644 --- a/cmd/v2/FyneApp.toml +++ b/cmd/v2/FyneApp.toml @@ -4,5 +4,5 @@ Website = "http://legu.cc" Icon = "app.png" Name = "RobotGUI" ID = "cc.legu.app" - Version = "1.0.14" - Build = 17 + Version = "1.0.15" + Build = 18 diff --git a/cmd/v2/ui/toy_userinfo.go b/cmd/v2/ui/toy_userinfo.go index 5cc4b2fee..51b7305aa 100644 --- a/cmd/v2/ui/toy_userinfo.go +++ b/cmd/v2/ui/toy_userinfo.go @@ -147,6 +147,11 @@ func (this *toyUserInfo) dataListener() { logrus.Error("unmarshal err") return } + + if rsp.Data == nil { + logrus.Debug("没有用户数据返回") + } + this.setProp(1, common.USERINFO_SERVER, rsp.Data.Sid) this.setProp(2, common.USERINFO_NAME, rsp.Data.Name) this.setProp(3, common.USERINFO_AVATAR, rsp.Data.Avatar) diff --git a/modules/user/api_login.go b/modules/user/api_login.go index 813f841d2..a75409f83 100644 --- a/modules/user/api_login.go +++ b/modules/user/api_login.go @@ -105,10 +105,11 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod //不是新账号 if !isNewUser { lastLoginTime := user.Logintime - user.Logintime = time.Now().Unix() - user.Lastloginip = session.GetIP() - update := utils.StructToMap(user) - err = this.module.modelUser.Change(user.Uid, update) + update := map[string]interface{}{ + "logintime": time.Now().Unix(), + "lastloginip": session.GetIP(), + } + err = this.module.modelUser.ChangeList(user.Uid, user.Id, update) if err != nil { code = pb.ErrorCode_DBError return