|
@@ -223,7 +223,7 @@ class OrderDetailService extends CrudService {
|
|
|
obj.real_pay = real_pay;
|
|
|
obj.buy_num_total = goods.reduce((p, n) => this.ctx.plus(p, n.buy_num), 0);
|
|
|
for (const og of obj.goods) {
|
|
|
- const { file = [], _id: goodSpec } = og;
|
|
|
+ const { file = [], _id: goodsSpec } = og;
|
|
|
const gfile = _.get(og, 'goods.file', []);
|
|
|
const nf = [ ...file, ...gfile ];
|
|
|
const url = _.get(_.head(nf), 'url');
|
|
@@ -231,7 +231,7 @@ class OrderDetailService extends CrudService {
|
|
|
delete og.file;
|
|
|
delete og.goods.file;
|
|
|
// 评价
|
|
|
- const q = { orderDetail, goodSpec };
|
|
|
+ const q = { orderDetail, goodsSpec };
|
|
|
const rate = await this.goodsRateModel.findOne(q, { _id: 1 });
|
|
|
obj.rate = _.get(rate, '_id');
|
|
|
|