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