lrf 2 年之前
父节点
当前提交
5f1d900be4
共有 1 个文件被更改,包括 0 次插入8 次删除
  1. 0 8
      app/service/view/goods.js

+ 0 - 8
app/service/view/goods.js

@@ -30,16 +30,8 @@ class GoodsService extends CrudService {
     delete goods.shop;
     const goodsNum = await this.goodsModel.count({ shop });
     shop.goods_num = goodsNum;
-    // 2022-10-17反馈问题6:将规格图片和商品图片合并,规格图片在前
-    for (const spec of specs) {
-      if (_.isArray(spec.file)) {
-        goods.file = [ ...spec.file, ..._.get(goods, 'file', []) ];
-      }
-    }
-
     // goods: 商品信息; specs:商品规格信息; shop:店铺信息
     const returnData = { goods, specs, shop };
-
     // 添加浏览次数
     await this.goodsModel.updateOne({ _id: id }, { view_num: (goods.view_num || 0) + 1 });