|
@@ -28,7 +28,7 @@ class GoodsService extends CrudService {
|
|
|
goods = _.omit(goods, [ 'meta', '__v' ]);
|
|
|
const shop = _.pick(goods.shop, [ 'logo', 'name', 'person', 'phone', '_id', 'goods_score', 'send_score', 'service_score' ]);
|
|
|
delete goods.shop;
|
|
|
- const goodsNum = await this.goodsModel.count({ shop });
|
|
|
+ const goodsNum = await this.goodsModel.count({ shop, status: '1' });
|
|
|
shop.goods_num = goodsNum;
|
|
|
// goods: 商品信息; specs:商品规格信息; shop:店铺信息
|
|
|
const returnData = { goods, specs, shop };
|