瀏覽代碼

bug:下架商品还能购买

lrf 2 年之前
父節點
當前提交
2bec07e421
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/service/util/trade.js

+ 1 - 1
app/service/util/trade.js

@@ -88,7 +88,7 @@ class TradeService extends CrudService {
       // 2.检查商品是否可以购买
       const goodsData = await this.goodsModel.findById(goods);
       const goodsRes = this.checkGoods(goodsData);
-      if (shopRes.result !== true) {
+      if (goodsRes.result !== true) {
         result = goodsRes;
         break;
       }