package router import ( domain "demo/data/dao" "github.com/gin-gonic/gin" ) func GoodsRouth(engine *gin.RouterGroup) { user := engine.Group("/goods") { user.GET("/all", getAllGoods) //user.POST("sendSms", SendVerificationCode) // //user.GET("/captcha", VerificationCode) } } func getAllGoods(c *gin.Context) { c.JSON(200, gin.H{ "code": 200, "msg": "success", "data": domain.SelectAll(), }) }