1
This commit is contained in:
parent
d9bcf821fd
commit
68a1dec5ab
@ -3,6 +3,7 @@ package ingame
|
|||||||
import (
|
import (
|
||||||
"q5"
|
"q5"
|
||||||
"f5"
|
"f5"
|
||||||
|
"main/common"
|
||||||
. "main/global"
|
. "main/global"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@ -38,6 +39,15 @@ func (this *InGameApi) HeroList(c *gin.Context) {
|
|||||||
f5.RspErr(c, 500, "server internal error")
|
f5.RspErr(c, 500, "server internal error")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rspObj := struct {
|
||||||
|
ErrCode int32 `json:"errcode"`
|
||||||
|
ErrMsg string `json:"errmsg"`
|
||||||
|
Page common.StreamPagination `json:"page"`
|
||||||
|
Rows [] interface{} `json:"rows"`
|
||||||
|
}{}
|
||||||
|
q5.NewSlice(&rspObj.Rows, 0, 10)
|
||||||
|
|
||||||
f5.DataSetStreamPageQuery(
|
f5.DataSetStreamPageQuery(
|
||||||
heroList,
|
heroList,
|
||||||
q5.SafeToInt32(reqJson.PageSize),
|
q5.SafeToInt32(reqJson.PageSize),
|
||||||
@ -49,9 +59,10 @@ func (this *InGameApi) HeroList(c *gin.Context) {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
func (p *f5.StreamPagination) {
|
func (p *f5.StreamPagination) {
|
||||||
|
rspObj.Page.FillPage(p)
|
||||||
},
|
},
|
||||||
func (row interface{}) {
|
func (row interface{}) {
|
||||||
|
q5.AppendSlice(&rspObj.Rows, row)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user