This commit is contained in:
aozhiwei 2024-04-18 20:47:45 +08:00
parent b9ff3260b2
commit e5ed83fc19
3 changed files with 30 additions and 4 deletions

View File

@ -37,6 +37,32 @@ type LoginRsp struct {
} `json:"info"` } `json:"info"`
} }
type UserRsp struct {
Errcode int `json:"errcode"`
Errmsg string `json:"errmsg"`
Info struct {
UserInfo struct {
Activated string `json:"activated"`
RenameCount string `json:"rename_count"`
AccountId string `json:"account_id"`
Name string `json:"name"`
HeadId string `json:"head_id"`
HeroId string `json:"hero_id"`
HeadFrame string `json:"head_frame"`
TotalLucky interface{} `json:"total_lucky"`
AdmissionItemNum interface{} `json:"admission_item_num"`
} `json:"user_info"`
HeroInfo struct {
HeroUniId string `json:"hero_uniid"`
HeroId string `json:"hero_id"`
Quality string `json:"quality"`
SpecSkill string `json:"spec_skill"`
Wealth interface{} `json:"wealth"`
ValidLefttime interface{} `json:"valid_lefttime"`
} `json:"hero_info"`
} `json:"info"`
}
type MapInfoRsp struct { type MapInfoRsp struct {
ModeId interface{} `json:"mode_id"` ModeId interface{} `json:"mode_id"`
MapId int32 `json:"map_id"` MapId int32 `json:"map_id"`

View File

@ -402,12 +402,12 @@ func (this *player) CMRefreshUser(hdr *f5.MsgHdr, msg *cs.CMRefreshUser) {
"account_id": this.GetAccountId(), "account_id": this.GetAccountId(),
"session_id": this.GetSessionId(), "session_id": this.GetSessionId(),
} }
rspObj := common.LoginRsp{} rspObj := common.UserRsp{}
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Config.GetById(0).GetGameapiUrl()) url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Config.GetById(0).GetGameapiUrl())
f5.GetHttpCliMgr().SendJsStyleJsonRspRequest( f5.GetHttpCliMgr().SendJsStyleJsonRspRequest(
url, url,
params, params,
rspObj, &rspObj,
func(rsp f5.HttpCliResponse) { func(rsp f5.HttpCliResponse) {
this.SendMsg(rspMsg) this.SendMsg(rspMsg)
if rsp.GetErr() == nil && rsp.JsonParseOk() { if rsp.GetErr() == nil && rsp.JsonParseOk() {
@ -425,7 +425,7 @@ func (this *player) CMRefreshUser(hdr *f5.MsgHdr, msg *cs.CMRefreshUser) {
q5.DuckToSimple(rspObj.Info.HeroInfo.ValidLefttime, &this.hero.validLeftTime) q5.DuckToSimple(rspObj.Info.HeroInfo.ValidLefttime, &this.hero.validLeftTime)
} }
if this.GetTeam() != nil { if this.GetTeam() != nil {
this.GetTeam().SendStateNotify() this.GetTeam().SendUpdateNotify()
} }
} }
}) })

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit c31eaf2c49d16754fb76241466208ff9dc412826 Subproject commit 380443c39edace66279a0ea21f9f7c80f6ec1fd4