1
This commit is contained in:
parent
3f8b508182
commit
a4367ab4db
@ -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())
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user