StephenArk30 hace 5 años
padre
commit
24f2e4129d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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({