lrf 2 年之前
父節點
當前提交
20e34bdbce
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/service/view/order.js

+ 2 - 0
app/service/view/order.js

@@ -73,6 +73,7 @@ class OrderService extends CrudService {
           const { goods: specGoods } = shop;
           for (const sg of specGoods) {
             const spec = _.pick(sg, [ '_id', 'name', 'file', 'act', 'buy_num', 'gift', 'price', 'freight', 'sp_price' ]);
+            if (!spec.price) spec.price = _.get(sg, 'sell_money');
             const goods = _.pick(sg.goods, [ '_id', 'name', 'file' ]);
             spec.goods = goods;
             specs.push(spec);
@@ -94,6 +95,7 @@ class OrderService extends CrudService {
         const specs = [];
         for (const sg of goods) {
           const spec = _.pick(sg, [ '_id', 'name', 'file', 'act', 'buy_num', 'gift', 'price', 'freight', 'sp_price' ]);
+          if (!spec.price) spec.price = _.get(sg, 'sell_money');
           const goods = _.pick(sg.goods, [ '_id', 'name', 'file' ]);
           spec.goods = goods;