Commit c397c589 by 杨树贤

商品标签

parent 15a654a5
Showing with 8 additions and 6 deletions
......@@ -6,6 +6,8 @@ var GoodsLabel = map[int]string{
2: "国际现货",
3: "猎芯期货",
4: "询价现货",
5: "原厂直售",
6: "猎芯精选",
}
// 商品标签对应的展示
......
......@@ -34,13 +34,13 @@ func (ts *TagsService) GetTags(skuId string, self_supplier_type int64) (goodsTag
goodsTags.GoodsLabelName = goodsLabel
goodsTags.GoodsLabel = goodsLabelType
for _, tagResult := range gjson.Get(goodsTagsStr, "tags").Array() {
tagName := vars.GoodsTags[int(tagResult.Int())]
tagNames = append(tagNames, tagName)
tags = append(tags, int(tagResult.Int()))
}
//for _, tagResult := range gjson.Get(goodsTagsStr, "tags").Array() {
// tagName := vars.GoodsTags[int(tagResult.Int())]
// tagNames = append(tagNames, tagName)
// tags = append(tags, int(tagResult.Int()))
//}
//todo hcy 2023.1.10 增加额外商品标签
//自定义标签
customerTag := gjson.Get(goodsTagsStr, "customer_tag").String()
if customerTag != "" {
customerTagArr := php2go.Explode(" ", php2go.Trim(customerTag))
......
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