添加活动信息

parent b0f31df2
Showing with 13 additions and 0 deletions
...@@ -15,6 +15,7 @@ type ApiGoods struct { ...@@ -15,6 +15,7 @@ type ApiGoods struct {
MpqStr interface{} `json:"mpq"` MpqStr interface{} `json:"mpq"`
Mpl int `json:"-"` Mpl int `json:"-"`
StandardBrand string `json:"standard_brand"` StandardBrand string `json:"standard_brand"`
ActivityInfo interface{} `json:"activity_info"`
StandardBrandName string `json:"standard_brand_name"` StandardBrandName string `json:"standard_brand_name"`
StandardBrandUrl string `json:"standard_brand_url"` StandardBrandUrl string `json:"standard_brand_url"`
MplStr interface{} `json:"mpl,omitempty"` MplStr interface{} `json:"mpl,omitempty"`
......
...@@ -86,7 +86,19 @@ func CurlGoodsInfo(ctx *gin.Context, goodsIdsStr string, params req.Param) (good ...@@ -86,7 +86,19 @@ func CurlGoodsInfo(ctx *gin.Context, goodsIdsStr string, params req.Param) (good
// goods.StandardBrandName = "" // goods.StandardBrandName = ""
// goods.StandardBrandUrl = "" // goods.StandardBrandUrl = ""
//} //}
ActivityInfoStr := data.Get("activity_info").String()
ActivityInfo := map[string]string{
"activity_id": gjson.Get(ActivityInfoStr, "activity_id").String(),
"activity_name": gjson.Get(ActivityInfoStr, "activity_name").String(),
"user_scope": gjson.Get(ActivityInfoStr, "user_scope").String(),
"ratio": gjson.Get(ActivityInfoStr, "ratio").String(),
"ratio_us": gjson.Get(ActivityInfoStr, "ratio_us").String(),
"sign_text": gjson.Get(ActivityInfoStr, "sign_text").String(),
"sign": gjson.Get(ActivityInfoStr, "sign").String(),
"show_name": gjson.Get(ActivityInfoStr, "show_name").String(),
}
goods.ActivityInfo = ActivityInfo
goods.StandardBrandName = "" goods.StandardBrandName = ""
goods.StandardBrandUrl = "" goods.StandardBrandUrl = ""
goods.PickType = int(data.Get("pick_type").Int()) goods.PickType = int(data.Get("pick_type").Int())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment