lrf 2 rokov pred
rodič
commit
2467c23005
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      app/service/zrOrder.js

+ 2 - 1
app/service/zrOrder.js

@@ -47,7 +47,8 @@ class ZrOrderService extends CrudService {
     if (!res.result) throw new BusinessError(ErrorCode.DATA_INVALID, res.msg);
     // 可以购买
     const customer = _.get(this.ctx.user, '_id');
-    const goodsInfo = await this.goodsModel.findById(goods);
+    let goodsInfo = await this.goodsModel.findById(goods);
+    goodsInfo = JSON.parse(JSON.stringify(goodsInfo));
     const buy_time = moment().format('YYYY-MM-DD HH:mm:ss');
     const no = `${moment().format('YYYYMMDDHHmmss')}-${this.createNonceStr()}`;
     const addressInfo = await this.addressModel.findById(address);