nav.go 429 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. "go-common/app/interface/main/web/model"
  4. "go-common/library/ecode"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func nav(c *bm.Context) {
  8. var (
  9. rawMid interface{}
  10. ok bool
  11. )
  12. if rawMid, ok = c.Get("mid"); !ok {
  13. // NOTE NoLogin here only for web
  14. c.JSON(model.FailedNavResp{}, ecode.NoLogin)
  15. return
  16. }
  17. mid := rawMid.(int64)
  18. c.JSON(webSvc.Nav(c, mid, c.Request.Header.Get("Cookie")))
  19. }