package init_serve import ( "github.com/gin-gonic/gin" _ "hongze/hz_crm_eta/docs" "hongze/hz_crm_eta/global" "hongze/hz_crm_eta/middleware" "hongze/hz_crm_eta/routers" ) // InitRouter 初始化路由 func InitRouter() (r *gin.Engine) { gin.SetMode(global.CONFIG.Serve.RunMode) r = gin.Default() r.Use(middleware.Cors()) r.Use(middleware.Recover()) rBase := r.Group("api/") routers.InitAuth(rBase) routers.InitEtaTrial(rBase) routers.InitChartPermission(rBase) routers.InitReportChapterType(rBase) routers.InitReportClassify(rBase) return }