package system import ( "github.com/gin-gonic/gin" v1 "miniapp/api/v1" "miniapp/middleware" ) type ArticleRouter struct { } // InitArticleRouter 注册Banner路由 func (s *BannerRouter) InitArticleRouter(Router *gin.RouterGroup) { articleRouter := Router.Group("article").Use(middleware.OperationRecord()).Use(middleware.JWTAuth()) publicRouter := Router.Group("article") bannerApi := v1.ApiGroupApp.SystemApiGroup.ArticleApi { articleRouter.POST("", bannerApi.CreateArticle) // 新建文章 articleRouter.DELETE("", bannerApi.DeleteArticle) // 删除文章 articleRouter.PUT("", bannerApi.UpdateArticle) // 更新文章 } { publicRouter.GET("list", bannerApi.GetArticleList) // 获取医院列表 publicRouter.GET(":id", bannerApi.GetArticleById) // 获取单条医院消息 } }