From 8f32dc45b3e7610c8b7d2ca1cbcc24e5aef5d3e9 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 11 Nov 2024 17:05:09 +0800 Subject: [PATCH] 1 --- server/wheelserver/api/v1/shop/shop.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/wheelserver/api/v1/shop/shop.go b/server/wheelserver/api/v1/shop/shop.go index a534c10c..fdbb94f3 100644 --- a/server/wheelserver/api/v1/shop/shop.go +++ b/server/wheelserver/api/v1/shop/shop.go @@ -36,6 +36,13 @@ func (this *ShopApi) Goods(c *gin.Context) { } func (this *ShopApi) Buy(c *gin.Context) { + reqJson := struct { + ItemId int32 `json:"item_id"` + }{} + if err := c.ShouldBindJSON(&reqJson); err != nil { + f5.RspErr(c, 1, err.Error()) + return + } s := c.MustGet(constant.SESSION_KEY).(common.Session) if s == nil { return