1
This commit is contained in:
parent
d9bcf821fd
commit
68a1dec5ab
@ -3,6 +3,7 @@ package ingame
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"main/common"
|
||||
. "main/global"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@ -38,6 +39,15 @@ func (this *InGameApi) HeroList(c *gin.Context) {
|
||||
f5.RspErr(c, 500, "server internal error")
|
||||
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(
|
||||
heroList,
|
||||
q5.SafeToInt32(reqJson.PageSize),
|
||||
@ -49,9 +59,10 @@ func (this *InGameApi) HeroList(c *gin.Context) {
|
||||
return true
|
||||
},
|
||||
func (p *f5.StreamPagination) {
|
||||
rspObj.Page.FillPage(p)
|
||||
},
|
||||
func (row interface{}) {
|
||||
|
||||
q5.AppendSlice(&rspObj.Rows, row)
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user