StephenArk30 vor 5 Jahren
Ursprung
Commit
24f2e4129d
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      src/api/controller/goods.js

+ 2 - 2
src/api/controller/goods.js

@@ -285,9 +285,9 @@ l
     if (think.isEmpty(relatedGoodsIds)) {
       // 查找同分类下的商品
       const goodsCategory = await model.where({id: goodsId}).find();
-      relatedGoods = await model.where({category_id: goodsCategory.category_id, is_new: 0}).field(['id', 'name', 'list_pic_url', 'retail_price']).limit(8).select();
+      relatedGoods = await model.where({category_id: goodsCategory.category_id, is_new: 1}).field(['id', 'name', 'list_pic_url', 'retail_price']).limit(8).select();
     } else {
-      relatedGoods = await model.where({id: ['IN', relatedGoodsIds], is_new: 0}).field(['id', 'name', 'list_pic_url', 'retail_price']).select();
+      relatedGoods = await model.where({id: ['IN', relatedGoodsIds], is_new: 1}).field(['id', 'name', 'list_pic_url', 'retail_price']).select();
     }
 
     return this.success({