@@ -45,16 +45,16 @@ func routeCommunityTeam(r *gin.RouterGroup) { | |||||
r.Use(mw.CheckBody) //body参数转换 | r.Use(mw.CheckBody) //body参数转换 | ||||
r.Use(mw.CheckSign) //签名校验 | r.Use(mw.CheckSign) //签名校验 | ||||
r.Use(mw.Checker) | r.Use(mw.Checker) | ||||
r.GET("/cate", hdl.Cate) | |||||
r.GET("/bank/store/cate", hdl.BankStoreCate) | r.GET("/bank/store/cate", hdl.BankStoreCate) | ||||
r.POST("/bank/store/list", hdl.BankStore) | r.POST("/bank/store/list", hdl.BankStore) | ||||
r.POST("/store", hdl.Store) | 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.Use(mw.AuthJWT) | ||||
r.POST("/store/addLike", hdl.StoreAddLike) | r.POST("/store/addLike", hdl.StoreAddLike) | ||||
r.POST("/store/cancelLike", hdl.StoreCancelLike) | 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("/goods/coupon", hdl.GoodsCoupon) | ||||
r.POST("/order/total", hdl.OrderTotal) | r.POST("/order/total", hdl.OrderTotal) | ||||
r.POST("/order/create", hdl.OrderCreate) | r.POST("/order/create", hdl.OrderCreate) | ||||
@@ -23,15 +23,14 @@ func Goods(c *gin.Context) { | |||||
json.Unmarshal([]byte(v.SpeImages), &speImageList) | json.Unmarshal([]byte(v.SpeImages), &speImageList) | ||||
} | } | ||||
tmp := map[string]interface{}{ | 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) | goodsList = append(goodsList, tmp) | ||||
} | } | ||||
@@ -83,6 +83,7 @@ func Store(c *gin.Context) { | |||||
"work_state": v["work_state"], | "work_state": v["work_state"], | ||||
"name": v["name"], | "name": v["name"], | ||||
"id": v["id"], | "id": v["id"], | ||||
"uid": v["uid"], | |||||
"km": v["km"], | "km": v["km"], | ||||
"time_str": v["timer"], | "time_str": v["timer"], | ||||
"phone": v["phone"], | "phone": v["phone"], | ||||