From 9c222203a10d1a0295dbc82e730ee1c5e8d1b744 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Fri, 6 Dec 2024 16:39:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E5=A2=9E=E5=87=8F=E5=95=86=E5=93=81=E6=8F=90=E7=A4=BA=E8=AF=AD?= =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/directionGoodsItem.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/components/directionGoodsItem.vue b/components/directionGoodsItem.vue index 3c2dae4..73b89e6 100644 --- a/components/directionGoodsItem.vue +++ b/components/directionGoodsItem.vue @@ -371,9 +371,16 @@ }, success: ({ data }) => { if (data > 0) { - this.$util.showToast({ - title: '加入购物车成功' - }); + if (type == 'add'){ + this.$util.showToast({ + title: '加入购物车成功' + }); + }else{ + this.$util.showToast({ + title: '移除购物车成功' + }); + } + this.$forceUpdate(); this.cartNumber += this.number; if (this.callback) this.callback();