lrf 2 年之前
父節點
當前提交
2467c23005
共有 1 個文件被更改,包括 2 次插入1 次删除
  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);
     if (!res.result) throw new BusinessError(ErrorCode.DATA_INVALID, res.msg);
     // 可以购买
     // 可以购买
     const customer = _.get(this.ctx.user, '_id');
     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 buy_time = moment().format('YYYY-MM-DD HH:mm:ss');
     const no = `${moment().format('YYYYMMDDHHmmss')}-${this.createNonceStr()}`;
     const no = `${moment().format('YYYYMMDDHHmmss')}-${this.createNonceStr()}`;
     const addressInfo = await this.addressModel.findById(address);
     const addressInfo = await this.addressModel.findById(address);