lrf 2 年 前
コミット
d991be0c62
1 ファイル変更2 行追加1 行削除
  1. 2 1
      app/service/view/goods.js

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

@@ -107,7 +107,7 @@ class GoodsService extends CrudService {
         as: 'act',
         as: 'act',
       },
       },
     });
     });
-    // // 整理数据
+    // 整理数据
     pipeline.push({
     pipeline.push({
       $project: {
       $project: {
         _id: 0,
         _id: 0,
@@ -144,6 +144,7 @@ class GoodsService extends CrudService {
       d.text = text;
       d.text = text;
       d.tag = tag;
       d.tag = tag;
     }
     }
+    data.act = _.uniqBy(data.act, '_id');
     return data;
     return data;
   }
   }