|
@@ -62,8 +62,6 @@ class GoodsService extends CrudService {
|
|
|
// 按照规格平铺数据
|
|
|
pipline.push({ $unwind: '$specs' });
|
|
|
// 格式化平铺后的数据
|
|
|
- // 2022-10-17反馈-问题6:将规格图片也拿出来
|
|
|
- // TODO: 整理规格图片与正常的商品图片
|
|
|
pipline.push({
|
|
|
$project: {
|
|
|
name: 1,
|
|
@@ -98,6 +96,7 @@ class GoodsService extends CrudService {
|
|
|
});
|
|
|
if (Object.keys(sort).length <= 0) sort = { sort: -1, create_time: -1 };
|
|
|
pipline.push({ $sort: sort });
|
|
|
+ console.log(pipline);
|
|
|
// 分页处理
|
|
|
const qPipline = _.cloneDeep(pipline);
|
|
|
if (parseInt(skip)) qPipline.push({ $skip: parseInt(skip) });
|