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"]