This commit is contained in:
aozhiwei 2024-07-16 19:30:32 +08:00
parent 68a1dec5ab
commit ba42fee885

View File

@ -38,8 +38,37 @@ func (this *cacheMgr) GetNfts(nfts []*common.NftDto) {
}
}
func (this *cacheMgr) GetIngameHero(string) (error, []interface{}) {
return nil, nil
func (this *cacheMgr) GetIngameHero(accountId string) (error, []interface{}) {
rspObj := struct {
ErrCode interface{} `json:"errcode"`
ErrMsg string `json:"errmsg"`
Rows []interface{}
}{}
var err error
rows := []interface{}{}
f5.GetHttpCliMgr().SendGoStyleRequest(
mt.Table.Config.GetGameApiUrl() + "/webapp/index.php",
map[string]string{
"c": "OutAppNft",
"a": "getHeroList",
"account_id": accountId,
},
func (rsp f5.HttpCliResponse) {
err = rsp.GetErr()
if rsp.GetErr() != nil {
return
}
err = q5.DecodeJson(rsp.GetRawData(), &rspObj)
if err != nil {
return
}
})
if err == nil {
if q5.SafeToInt32(rspObj.ErrCode) == 0 {
rows = rspObj.Rows
}
}
return err, rows
}
func (this *cacheMgr) fastGetNft(dto *common.NftDto) {