From a4367ab4db578ebf845dbe37a997d95b2782fead Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 28 Oct 2024 17:22:44 +0800 Subject: [PATCH] 1 --- server/marketserver/api/v1/ingame/ingame.go | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/server/marketserver/api/v1/ingame/ingame.go b/server/marketserver/api/v1/ingame/ingame.go index 0e0246f4..eac94835 100644 --- a/server/marketserver/api/v1/ingame/ingame.go +++ b/server/marketserver/api/v1/ingame/ingame.go @@ -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()) + }) }