diff --git a/app/router/router.go b/app/router/router.go index 94edf78..e5cf5cc 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -45,16 +45,16 @@ func routeCommunityTeam(r *gin.RouterGroup) { r.Use(mw.CheckBody) //body参数转换 r.Use(mw.CheckSign) //签名校验 r.Use(mw.Checker) - r.GET("/cate", hdl.Cate) r.GET("/bank/store/cate", hdl.BankStoreCate) r.POST("/bank/store/list", hdl.BankStore) r.POST("/store", hdl.Store) + r.GET("/goods/cate", hdl.Cate) + r.POST("/goods", hdl.Goods) + r.POST("/goods/sku", hdl.GoodsSku) // 用户授权后调用的接口 r.Use(mw.AuthJWT) r.POST("/store/addLike", hdl.StoreAddLike) r.POST("/store/cancelLike", hdl.StoreCancelLike) - r.POST("/goods", hdl.Goods) - r.POST("/goods/sku", hdl.GoodsSku) r.POST("/goods/coupon", hdl.GoodsCoupon) r.POST("/order/total", hdl.OrderTotal) r.POST("/order/create", hdl.OrderCreate) diff --git a/app/svc/svc_goods.go b/app/svc/svc_goods.go index 7c6f19e..326088a 100644 --- a/app/svc/svc_goods.go +++ b/app/svc/svc_goods.go @@ -23,15 +23,14 @@ func Goods(c *gin.Context) { json.Unmarshal([]byte(v.SpeImages), &speImageList) } tmp := map[string]interface{}{ - "id": utils.IntToStr(v.Id), - "title": v.Title, - "img": v.Img, - "info": v.Info, - "price": v.Price, - "stock": utils.IntToStr(v.Stock), - "is_single_sku": utils.IntToStr(v.IsSingleSku), - "sale_count": utils.IntToStr(v.SaleCount), - "spe_image_list": speImageList, + "id": utils.IntToStr(v.Id), + "title": v.Title, + "img": v.Img, + "info": v.Info, + "price": v.Price, + "stock": utils.IntToStr(v.Stock), + "is_single_sku": utils.IntToStr(v.IsSingleSku), + "sale_count": utils.IntToStr(v.SaleCount), } goodsList = append(goodsList, tmp) } diff --git a/app/svc/svc_store.go b/app/svc/svc_store.go index 928a365..a836f68 100644 --- a/app/svc/svc_store.go +++ b/app/svc/svc_store.go @@ -83,6 +83,7 @@ func Store(c *gin.Context) { "work_state": v["work_state"], "name": v["name"], "id": v["id"], + "uid": v["uid"], "km": v["km"], "time_str": v["timer"], "phone": v["phone"],