From a1ecd801e1c09246d1117ca19dfaac1a4e38083a Mon Sep 17 00:00:00 2001 From: "DESKTOP-45ANQ2C\\unis" <121212121@qq.com> Date: Fri, 13 Dec 2024 15:31:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=91=E9=97=B2=E5=B9=B3=E5=8F=B0=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=A4=B4=E5=83=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constant.go | 2 ++ webapi/deprecated.go | 4 ++-- worldsrv/action_login.go | 4 ++++ worldsrv/task_login.go | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/constant.go b/common/constant.go index f248e24..05b5141 100644 --- a/common/constant.go +++ b/common/constant.go @@ -328,6 +328,8 @@ const ( GainWayGuide2 = 117 // 竞技馆引导奖励 GainWayCompound = 118 // 道具合成消耗 GainWayCompoundGain = 119 // 道具合成获得 + GainWayPlatformUpScore = 120 // 平台上分 + GainWayPlatformDownScore = 121 // 平台下分 ) // 后台选择 金币变化类型 的充值 类型id号起始 diff --git a/webapi/deprecated.go b/webapi/deprecated.go index 1e7bc89..010eb72 100644 --- a/webapi/deprecated.go +++ b/webapi/deprecated.go @@ -243,7 +243,7 @@ type PlatfromCreateAccountReq struct { Username string `json:"username"` Channel string `json:"channel"` Nickname string `json:"nickname"` - Avater string `json:"avater"` + Avatar string `json:"Avatar"` Timestamp int64 `json:"timestamp"` } @@ -262,7 +262,7 @@ type PlatfromUpScoreReq struct { Username string `json:"username"` Channel string `json:"channel"` Timestamp int64 `json:"timestamp"` - Count string `json:"count"` + Count int64 `json:"count"` } // 上分返回 diff --git a/worldsrv/action_login.go b/worldsrv/action_login.go index f0a4693..dc0c58b 100644 --- a/worldsrv/action_login.go +++ b/worldsrv/action_login.go @@ -83,8 +83,12 @@ func (this *CSLoginHandler) Process(s *netlib.Session, packetid int, data interf logger.Logger.Tracef("(this *CSLoginHandler) Process ParseJwtWithClaims: claims:%v", claims.(jwt.MapClaims)) username := (claims.(jwt.MapClaims))["Username"].(string) + headUrl := (claims.(jwt.MapClaims))["Avatar"].(string) + nickname := (claims.(jwt.MapClaims))["NickName"].(string) { csl.Username = username + csl.HeadUrl = headUrl + csl.Name = nickname } } diff --git a/worldsrv/task_login.go b/worldsrv/task_login.go index 6b96d83..facf7ed 100644 --- a/worldsrv/task_login.go +++ b/worldsrv/task_login.go @@ -51,7 +51,9 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} { logger.Logger.Tracef("TaskLogin ParseJwtWithClaims: claims:%v", claims.(jwt.MapClaims)) username := (claims.(jwt.MapClaims))["Username"].(string) + headUrl := (claims.(jwt.MapClaims))["Avatar"].(string) t.Username = username + t.HeadUrl = headUrl } //expire := (claims.(jwt.MapClaims))["Exp"]