router.go 783 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package routers
  2. import (
  3. "eta_gn/eta_report/controllers"
  4. "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. ns := web.NewNamespace("/api",
  8. web.NSNamespace("/report",
  9. web.NSInclude(
  10. &controllers.ReportShareController{},
  11. ),
  12. ),
  13. web.NSNamespace("/wechat",
  14. web.NSInclude(
  15. &controllers.WechatCommonController{},
  16. ),
  17. ),
  18. web.NSNamespace("/english_report",
  19. web.NSInclude(
  20. &controllers.EnglishReportShareController{},
  21. ),
  22. ),
  23. web.NSNamespace("/smart_report",
  24. web.NSInclude(
  25. &controllers.SmartReportController{},
  26. ),
  27. ),
  28. web.NSNamespace("/excel",
  29. web.NSInclude(
  30. &controllers.ExcelController{},
  31. ),
  32. ),
  33. web.NSNamespace("/chart",
  34. web.NSInclude(
  35. &controllers.ChartController{},
  36. ),
  37. ),
  38. )
  39. web.AddNamespace(ns)
  40. }