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);
     // 可以购买
     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);