sys_base.go 640 B

12345678910111213141516171819202122
  1. package system
  2. import (
  3. v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type BaseRouter struct {
  7. }
  8. func (s *BaseRouter) InitBaseRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
  9. baseRouter := Router.Group("base")
  10. var baseApi = v1.ApiGroupApp.SystemApiGroup.BaseApi
  11. {
  12. baseRouter.POST("login", baseApi.Login)
  13. baseRouter.POST("captcha", baseApi.Captcha)
  14. baseRouter.POST("loginwx", baseApi.LoginWx)
  15. baseRouter.POST("register", baseApi.RegisterWx)
  16. baseRouter.GET("getContentList", v1.ApiGroupApp.AutoCodeApiGroup.ContentApi.GetContentList) // 获取Content列表
  17. }
  18. return baseRouter
  19. }