fix
zhangqian
2023-12-01 8324f872ef3a4d0c978a9b1d062800c6a1701c12
pkg/contextx/contextx.go
@@ -81,6 +81,7 @@
   slf.ctx.JSON(http.StatusOK, ResponseList{
      Data:  data,
      Total: total,
      Code:  ecode.OK,
   })
}
@@ -96,6 +97,10 @@
   slf.Result(errCode, map[string]interface{}{}, ecode.GetMsg(errCode))
}
func (slf *Context) FailWithMsg(errCode int, msg string) {
   slf.Result(errCode, map[string]interface{}{}, msg)
}
func (slf *Context) FailWithDetailed(errCode int, data interface{}) {
   slf.Result(errCode, data, ecode.GetMsg(errCode))
}