更改为shouldBindJson 不主动修改 400

This commit is contained in:
pixel
2020-03-20 13:46:11 +08:00
parent dda57ce7e8
commit cee863d3b0
7 changed files with 35 additions and 35 deletions

View File

@@ -85,7 +85,7 @@ func DeleteFile(c *gin.Context) {
// @Router /fileUploadAndDownload/getFileList [post]
func GetFileList(c *gin.Context) {
var pageInfo modelInterface.PageInfo
_ = c.BindJSON(&pageInfo)
_ = c.ShouldBindJSON(&pageInfo)
err, list, total := new(dbModel.ExaFileUploadAndDownload).GetInfoList(pageInfo)
if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("获取数据失败,%v", err), gin.H{})