You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
711 B

2 years ago
  1. package router
  2. import (
  3. "gitea.baoapi.com/root/stu_uuos/web/handler"
  4. "github.com/gin-gonic/gin"
  5. "net/http"
  6. /*
  7. "gitea.241210.com/operate/uuos/web/handler"
  8. ginmw "gitea.241210.com/operate/uuos/web/middleware"
  9. */)
  10. func Init() *gin.Engine {
  11. gin.SetMode(gin.ReleaseMode)
  12. router := gin.New()
  13. router.Use(gin.Recovery())
  14. /*
  15. router.Use(ginmw.LoggerWithMico())
  16. router.Use(ginmw.Cors())
  17. router.NoMethod(handler.NoMethod)
  18. router.NoRoute(handler.NoRoute)
  19. router.Any("/", handler.Home)
  20. */
  21. router.StaticFS("/export", http.Dir("./export/"))
  22. rb := router.Group("/")
  23. {
  24. rb.GET("", handler.Hello)
  25. }
  26. //获取企业微信人员
  27. router.POST("/hello", handler.Hello) //新建群聊
  28. return router
  29. }