item.go 418 B

123456789101112131415161718192021222324252627
  1. package http
  2. import (
  3. "go-common/app/interface/openplatform/seo/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func itemInfo(c *bm.Context) {
  7. logUA(c)
  8. arg := new(model.ArgItemID)
  9. if err := c.Bind(arg); err != nil {
  10. return
  11. }
  12. bot := isBot(c)
  13. res, err := srv.GetItem(c, arg.ID, bot)
  14. if err != nil {
  15. c.String(0, "%v", err)
  16. return
  17. }
  18. if setCache(c, res) {
  19. return
  20. }
  21. c.String(0, string(res))
  22. }