This commit is contained in:
aozhiwei 2024-10-28 17:22:44 +08:00
parent 3f8b508182
commit a4367ab4db

View File

@ -229,7 +229,51 @@ func (this *InGameApi) newHeroMint(c *gin.Context) {
}
func (this *InGameApi) GetCircuitRanking(c *gin.Context) {
accountAddress := c.DefaultQuery("address", "")
params := map[string]string{
"c": "OutAppCircuit",
"a": "getCircuitRanking",
"account_address": accountAddress,
}
rspObj := &struct {
ErrCode interface{} `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{}
f5.GetHttpCliMgr().SendGoStyleRequest(
mt.Table.Config.GetGameApiUrl()+"/webapp/index.php",
params,
func(rsp f5.HttpCliResponse) {
if rsp.GetErr() != nil {
rspObj.ErrCode = 500
rspObj.ErrMsg = "server internal error1"
c.JSON(200, rspObj)
return
}
c.JSON(200, rsp.GetJsonData())
})
}
func (this *InGameApi) GetCircuitPhaseRanking(c *gin.Context) {
accountAddress := c.DefaultQuery("address", "")
params := map[string]string{
"c": "OutAppCircuit",
"a": "getCircuitPhaseRanking",
"account_address": accountAddress,
}
rspObj := &struct {
ErrCode interface{} `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{}
f5.GetHttpCliMgr().SendGoStyleRequest(
mt.Table.Config.GetGameApiUrl()+"/webapp/index.php",
params,
func(rsp f5.HttpCliResponse) {
if rsp.GetErr() != nil {
rspObj.ErrCode = 500
rspObj.ErrMsg = "server internal error1"
c.JSON(200, rspObj)
return
}
c.JSON(200, rsp.GetJsonData())
})
}