|
@@ -22,7 +22,7 @@ class GoodsService extends CrudService {
|
|
|
let goods = await this.goodsModel.findById(id, { file: 1, tags: 1, name: 1, shot_brief: 1, brief: 1, send_time: 1, shop: 1, view_num: 1 }).populate(populate);
|
|
|
if (!goods) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到商品数据');
|
|
|
goods = JSON.parse(JSON.stringify(goods));
|
|
|
- let specs = await this.goodsSpecModel.find({ goods: id, status: '0' }, { sell_money: 1, flow_money: 1, freight: 1, name: 1, num: 1, can_group: 1, group_config: 1 });
|
|
|
+ let specs = await this.goodsSpecModel.find({ goods: id, status: '0' }, { sell_money: 1, flow_money: 1, freight: 1, name: 1, num: 1, can_group: 1, group_config: 1, file: 1 });
|
|
|
specs = JSON.parse(JSON.stringify(specs));
|
|
|
goods = _.omit(goods, [ 'meta', '__v' ]);
|
|
|
const shop = _.pick(goods.shop, [ 'logo', 'name', 'person', 'phone', '_id' ]);
|