router.go 746B

123456789101112131415161718192021222324
  1. // @APIVersion 1.0.0
  2. // @Title beego Test API
  3. // @Description beego has a very cool tools to autogenerate documents for your API
  4. // @Contact astaxie@gmail.com
  5. // @TermsOfServiceUrl http://beego.me/
  6. // @License Apache 2.0
  7. // @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
  8. package routers
  9. import (
  10. "h5-2019/controllers"
  11. "github.com/astaxie/beego"
  12. )
  13. func init() {
  14. ns := beego.NewNamespace("/api",
  15. beego.NSRouter("/appid", &controllers.BaseController{}, "get:WechatAppID"),
  16. beego.NSRouter("/user", &controllers.H5Controller{}, "get:GetCustomer"),
  17. beego.NSRouter("/share", &controllers.H5Controller{}, "get:GetTotalShare"),
  18. beego.NSRouter("/share", &controllers.H5Controller{}, "put:PutShare"),
  19. )
  20. beego.AddNamespace(ns)
  21. }