1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-08 02:11:46 +08:00
parent af29b13ba4
commit 2b25ae6b35
9 changed files with 64 additions and 44 deletions

View File

@@ -24,7 +24,7 @@ func (h Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.L
defer c.Close()
return
}
isSessionValid := data.CheakSession()
isSessionValid, hashcode := data.CheakSession()
if !isSessionValid {
defer c.Close()
@@ -38,12 +38,14 @@ func (h Controller) Login(data *user.MAIN_LOGIN_IN, c gnet.Conn) (result *user.L
return
}
currentPlayer := player.GetPlayer(c, data.Head.UserID)
if currentPlayer == nil {
cool.Logger.Error(context.Background(), "获取玩家失败", data.Head.UserID)
defer c.Close()
return
}
currentPlayer.Hash = hashcode
currentPlayer.Service = service.NewUserService(data.Head.UserID)
currentPlayer.Info = currentPlayer.Service.Info.SetLogin()