cards.go 404 B

1234567891011121314151617181920212223
  1. package http
  2. import (
  3. "go-common/library/ecode"
  4. bm "go-common/library/net/http/blademaster"
  5. "strings"
  6. )
  7. func card(c *bm.Context) {
  8. c.JSON(artSrv.FindCard(c, c.Request.Form.Get("id")))
  9. }
  10. func cards(c *bm.Context) {
  11. var (
  12. params = c.Request.Form
  13. )
  14. ids := strings.Split(params.Get("ids"), ",")
  15. if len(ids) > 100 {
  16. c.JSON(nil, ecode.RequestErr)
  17. return
  18. }
  19. c.JSON(artSrv.FindCards(c, ids))
  20. }