huangjiajun 1 月之前
父節點
當前提交
fb1bb7a3a9
共有 3 個檔案被更改,包括 12 行新增12 行删除
  1. +3
    -3
      app/router/router.go
  2. +8
    -9
      app/svc/svc_goods.go
  3. +1
    -0
      app/svc/svc_store.go

+ 3
- 3
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)


+ 8
- 9
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)
}


+ 1
- 0
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"],


Loading…
取消
儲存