reportformat.go 256 B

12345678910111213141516
  1. package servers
  2. import (
  3. "net/http"
  4. "github.com/gin-gonic/gin"
  5. )
  6. func ReportFormat(c *gin.Context, success bool, msg string, json gin.H) {
  7. // 开始时间
  8. c.JSON(http.StatusOK, gin.H{
  9. "success": success,
  10. "msg": msg,
  11. "data": json,
  12. })
  13. }