1
This commit is contained in:
parent
8786f49b37
commit
9e58278f3a
@ -1,6 +1,9 @@
|
||||
package shop
|
||||
|
||||
import (
|
||||
"main/constant"
|
||||
"main/common"
|
||||
"main/vo"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -8,4 +11,12 @@ type ShopApi struct {
|
||||
}
|
||||
|
||||
func (this *ShopApi) Goods(c *gin.Context) {
|
||||
s := c.MustGet(constant.SESSION_KEY).(common.Session)
|
||||
if s == nil {
|
||||
return
|
||||
}
|
||||
rspObj := struct {
|
||||
vo.BaseVo
|
||||
}{}
|
||||
c.JSON(200, rspObj)
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package shop
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"main/middleware"
|
||||
"main/api/v1"
|
||||
)
|
||||
|
||||
@ -9,5 +10,7 @@ type ShopRouter struct{}
|
||||
|
||||
func (this *ShopRouter) InitRouter() {
|
||||
api := v1.ApiGroupApp.ShopApiGroup
|
||||
f5.GetApp().GetGinEngine().GET("/api/v1/shop/goods", api.ShopApi.Goods)
|
||||
f5.GetApp().GetGinEngine().GET("/api/v1/shop/goods",
|
||||
middleware.JwtAuth,
|
||||
api.ShopApi.Goods)
|
||||
}
|
||||
|
8
server/wheelserver/vo/goods.go
Normal file
8
server/wheelserver/vo/goods.go
Normal file
@ -0,0 +1,8 @@
|
||||
package vo
|
||||
|
||||
import (
|
||||
)
|
||||
|
||||
type Goods struct {
|
||||
ItemId int32 `json:"item_id"`
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user