tv.go 365 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. "strconv"
  4. "go-common/library/ecode"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func userInfo(c *bm.Context) {
  8. var (
  9. mid int
  10. err error
  11. )
  12. midStr := c.Request.Form.Get("mid")
  13. if mid, err = strconv.Atoi(midStr); err != nil {
  14. c.JSON(nil, ecode.RequestErr)
  15. return
  16. }
  17. res, err := svc.UserInfo(c, int64(mid))
  18. c.JSON(res, err)
  19. }