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.
31 lines
737 B
31 lines
737 B
5 years ago
|
package router
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
"live/app/controller/goods"
|
||
|
"live/app/router/middleware"
|
||
|
)
|
||
|
|
||
|
func Router(router *gin.Engine) {
|
||
|
liveRouter := router.Group("/api/v1/live")
|
||
|
liveRouter.Use(middleware.Decrypt())
|
||
|
{
|
||
|
// 橱柜
|
||
|
cupboardR := liveRouter.Group("/cupboard")
|
||
|
cupboardR.Use(middleware.Auth())
|
||
|
{
|
||
|
cupboard := &goods.Cupboard{}
|
||
|
cupboardR.POST("list", cupboard.List) // 会员橱柜列表
|
||
|
cupboardR.POST("delete", cupboard.Delete) // 会员橱柜商品删除
|
||
|
}
|
||
|
// 商品
|
||
|
goodsR := liveRouter.Group("/goods")
|
||
|
{
|
||
|
goodsC := &goods.Goods{}
|
||
|
goodsR.POST("list", goodsC.List)
|
||
|
goodsR.POST("brandlist", goodsC.BrandList)
|
||
|
goodsR.POST("brandgoodslist", goodsC.BrandGoodsList)
|
||
|
}
|
||
|
}
|
||
|
}
|