统一分页回传结构体

This commit is contained in:
pixel
2020-04-08 14:31:22 +08:00
parent 4277505c6a
commit 1051db5d4c
8 changed files with 45 additions and 38 deletions
+6 -6
View File
@@ -66,12 +66,12 @@ func GetApiList(c *gin.Context) {
if err != nil {
response.FailWithMessage(fmt.Sprintf("获取数据失败,%v", err), c)
} else {
response.OkDetailed(gin.H{
"list": list,
"total": total,
"page": sp.PageInfo.Page,
"pageSize": sp.PageInfo.PageSize,
}, "删除成功", c)
response.OkWithData(resp.PageResult{
List: list,
Total: total,
Page: sp.PageInfo.Page,
PageSize: sp.PageInfo.PageSize,
}, c)
}
}