|
@@ -96,17 +96,17 @@ class GoodsJoinActService extends CrudService {
|
|
|
tPipeline.push({ $count: 'total' });
|
|
|
const total = await this.model.aggregate(tPipeline);
|
|
|
// 整理图片
|
|
|
- const list = [];
|
|
|
- for (const r of res) {
|
|
|
- const i = _.cloneDeep(r);
|
|
|
- const { spec_file = [] } = i;
|
|
|
- const goods_file = _.get(r, 'goods.file', []);
|
|
|
- const nf = [ ...spec_file, ...goods_file ];
|
|
|
- delete i.spec_file;
|
|
|
- i.goods.file = nf;
|
|
|
- list.push(i);
|
|
|
- }
|
|
|
- return { data: list, total: _.get(_.head(total), 'total', 0) };
|
|
|
+ // const list = [];
|
|
|
+ // for (const r of res) {
|
|
|
+ // const i = _.cloneDeep(r);
|
|
|
+ // const { spec_file = [] } = i;
|
|
|
+ // const goods_file = _.get(r, 'goods.file', []);
|
|
|
+ // const nf = [ ...spec_file, ...goods_file ];
|
|
|
+ // delete i.spec_file;
|
|
|
+ // i.goods.file = nf;
|
|
|
+ // list.push(i);
|
|
|
+ // }
|
|
|
+ return { data: res, total: _.get(_.head(total), 'total', 0) };
|
|
|
}
|
|
|
}
|
|
|
|