广告平台(站长使用)
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
465 B

  1. package hdl
  2. import (
  3. "applet/app/e"
  4. "applet/app/svc"
  5. "applet/app/utils"
  6. "fmt"
  7. "github.com/gin-gonic/gin"
  8. )
  9. func Demo(c *gin.Context) {
  10. mediumId := utils.GenerateUniqueRandomNumbers(8)
  11. fmt.Println(mediumId)
  12. var args interface{}
  13. err := c.ShouldBindJSON(&args)
  14. if err != nil {
  15. err = svc.HandleValidateErr(err)
  16. err1 := err.(e.E)
  17. e.OutErr(c, err1.Code, err1.Error())
  18. return
  19. }
  20. e.OutSuc(c, map[string]interface{}{
  21. "args": args,
  22. }, nil)
  23. return
  24. }