Kaynağa Gözat

bug:活动标签bug

lrf 2 yıl önce
ebeveyn
işleme
e547871339
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      app/service/view/goods.js

+ 2 - 2
app/service/view/goods.js

@@ -32,7 +32,7 @@ class GoodsService extends CrudService {
         from: 'actTags',
         localField: 'act_tags',
         foreignField: 'value',
-        pipeline: [{ $project: { label: 1 } }],
+        pipeline: [{ $match: { show_goods: '0' } }, { $project: { label: 1 } }],
         as: 'act_tags',
       },
     });
@@ -256,7 +256,7 @@ class GoodsService extends CrudService {
       if (act_tags.length > 0) {
         for (const t of act_tags) {
           const r = tagsData.find(f => f.value === t);
-          if (r) actTagsShow.push(r.label);
+          if (r) actTagsShow.push({ label: r.label });
         }
       }
       i.actTagsShow = actTagsShow;