🎨 优化用户和分类相关接口,新增banner接口
This commit is contained in:
22
router/app/banner.go
Normal file
22
router/app/banner.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package app
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type BannerRouter struct{}
|
||||
|
||||
// InitBannerRouter 初始化 Banner 路由
|
||||
func (b *BannerRouter) InitBannerRouter(Router, PublicRouter *gin.RouterGroup) {
|
||||
sysRouter := Router.Group("banner")
|
||||
appRouter := PublicRouter.Group("banner")
|
||||
|
||||
{
|
||||
sysRouter.POST("", bannerApi.Create) // 新建Banner
|
||||
sysRouter.DELETE("", bannerApi.Delete) // 删除Banner
|
||||
sysRouter.PUT("", bannerApi.Update) // 更新Banner
|
||||
}
|
||||
{
|
||||
appRouter.GET("/list", bannerApi.GetList) // 获取Banner列表
|
||||
appRouter.GET("", bannerApi.GetByID) // Banner公开接口
|
||||
appRouter.GET("/index", bannerApi.GetIndexBanners) // 获取首页Banner
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user