From 994ef217acf8419b9c465818f6d326c9df7651d9 Mon Sep 17 00:00:00 2001 From: paulGao Date: Fri, 27 May 2022 15:23:10 +0800 Subject: [PATCH] add wholesale of sale model --- buyer/src/pages/Cart.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/buyer/src/pages/Cart.vue b/buyer/src/pages/Cart.vue index 0b5a6415..21589aa0 100644 --- a/buyer/src/pages/Cart.vue +++ b/buyer/src/pages/Cart.vue @@ -363,13 +363,13 @@ export default { }, // 设置购买数量 changeNum(val, id) { - console.log(val, id); - APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => { - console.log(res); - if (res.success) { - this.getCartList(); - } - }); + if (val) { + APICart.setCartGoodsNum({ skuId: id, num: val }).then((res) => { + if (res.success) { + this.getCartList(); + } + }); + } }, // 设置商品选中状态 async changeChecked(status, type, id) {