sports.go 560 B

1234567891011121314151617181920212223242526272829
  1. package http
  2. import (
  3. "go-common/app/interface/main/activity/model/sports"
  4. "go-common/library/ecode"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func qq(c *bm.Context) {
  8. params := c.Request.Form
  9. p := new(sports.ParamQq)
  10. if err := c.Bind(p); err != nil {
  11. return
  12. }
  13. if p.Tp <= 0 && p.Route == "" {
  14. c.JSON(nil, ecode.RequestErr)
  15. return
  16. }
  17. c.JSON(sportsSvc.Qq(c, params, p))
  18. }
  19. func news(c *bm.Context) {
  20. params := c.Request.Form
  21. p := new(sports.ParamNews)
  22. if err := c.Bind(p); err != nil {
  23. return
  24. }
  25. c.JSON(sportsSvc.News(c, params, p))
  26. }