bnj.go 630 B

1234567891011121314151617181920212223242526272829303132
  1. package http
  2. import bm "go-common/library/net/http/blademaster"
  3. func bnj2019(c *bm.Context) {
  4. var mid int64
  5. if midInter, ok := c.Get("mid"); ok {
  6. mid = midInter.(int64)
  7. }
  8. c.JSON(webSvc.Bnj2019(c, mid))
  9. }
  10. func bnj2019Aids(c *bm.Context) {
  11. data := make(map[string]interface{}, 1)
  12. data["list"] = webSvc.Bnj2019Aids(c)
  13. c.JSON(data, nil)
  14. }
  15. func timeline(c *bm.Context) {
  16. var mid int64
  17. if midInter, ok := c.Get("mid"); ok {
  18. mid = midInter.(int64)
  19. }
  20. list, err := webSvc.Timeline(c, mid)
  21. if err != nil {
  22. c.JSON(nil, err)
  23. return
  24. }
  25. data := make(map[string]interface{}, 1)
  26. data["list"] = list
  27. c.JSON(data, nil)
  28. }