1
This commit is contained in:
parent
334baed12e
commit
1a37d9670a
@ -9,6 +9,27 @@ import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
type HistorySeasons struct {
|
||||
TotalKills int `json:"total_kills"`
|
||||
WinTimes int `json:"win_times"`
|
||||
}
|
||||
|
||||
type LoginRsp struct {
|
||||
Errcode int `json:"errcode"`
|
||||
Errmsg string `json:"errmsg"`
|
||||
Info struct {
|
||||
Activated string `json:"activated"`
|
||||
AccountID string `json:"account_id"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"head_id"`
|
||||
AvatarHead string `json:"head_frame"`
|
||||
Star string `json:"current_star_num"`
|
||||
Rank string `json:"current_rank"`
|
||||
LastLoginTime string `json:"last_login_time"`
|
||||
HistorySeasons []HistorySeasons `json:"history_seasons"`
|
||||
} `json:"info"`
|
||||
}
|
||||
|
||||
type WspListener interface {
|
||||
ProcessSSMMsg(*ss.SsNetMsgHandler, *f5.MsgHdr)
|
||||
SendProxyMsg(net.Conn, uint16, proto.Message)
|
||||
|
@ -10,6 +10,7 @@ import (
|
||||
"q5"
|
||||
//"net"
|
||||
"main/constant"
|
||||
"main/common"
|
||||
. "main/global"
|
||||
)
|
||||
|
||||
@ -72,27 +73,8 @@ func (this *playerMgr) CMLogin(hdr *f5.MsgHdr, msg *cs.CMLogin) {
|
||||
})
|
||||
}
|
||||
|
||||
type HistorySeasons struct {
|
||||
TotalKills int `json:"total_kills"`
|
||||
WinTimes int `json:"win_times"`
|
||||
}
|
||||
|
||||
func (this *playerMgr) apiAuthCb(hdr *f5.MsgHdr, msg *cs.CMLogin, rsp f5.HttpCliResponse) {
|
||||
resObj := struct {
|
||||
Errcode int `json:"errcode"`
|
||||
Errmsg string `json:"errmsg"`
|
||||
Info struct {
|
||||
Activated string `json:"activated"`
|
||||
AccountID string `json:"account_id"`
|
||||
Name string `json:"name"`
|
||||
Avatar string `json:"head_id"`
|
||||
AvatarHead string `json:"head_frame"`
|
||||
Star string `json:"current_star_num"`
|
||||
Rank string `json:"current_rank"`
|
||||
LastLoginTime string `json:"last_login_time"`
|
||||
HistorySeasons []HistorySeasons `json:"history_seasons"`
|
||||
} `json:"info"`
|
||||
}{}
|
||||
resObj := common.LoginRsp{}
|
||||
err := json.Unmarshal([]byte(rsp.GetRawData()), &resObj)
|
||||
if err != nil {
|
||||
f5.GetSysLog().Info("Api服务器JSON 解析错误:%s\n", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user