From 654930b1281c1118ab099a694dd7b60b009cad58 Mon Sep 17 00:00:00 2001 From: buffeyu Date: Thu, 27 Jan 2022 10:59:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A4=E8=B4=A7?= =?UTF-8?q?=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/for-comparison/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/for-comparison/index.vue b/pages/for-comparison/index.vue index 87b1c4f..4adac22 100644 --- a/pages/for-comparison/index.vue +++ b/pages/for-comparison/index.vue @@ -92,12 +92,13 @@ 交货时间 - + + From 9753a1077a3d26bc350b2e91d0e2e8f090d83aad Mon Sep 17 00:00:00 2001 From: buffeyu Date: Thu, 27 Jan 2022 11:14:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=AD=E7=89=A9?= =?UTF-8?q?=E8=BD=A6=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/cart/index.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pages/cart/index.vue b/pages/cart/index.vue index 58d90cd..3791221 100644 --- a/pages/cart/index.vue +++ b/pages/cart/index.vue @@ -82,9 +82,9 @@ - {{ allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?' }} + {{ onlyQuantity ? '确定将当前纸品删除吗?' : (allSelected ? '确定将购物车纸品删除吗?' : '确定将当前纸品删除吗?') }} - 取消 + {{onlyQuantity ? '我在想想' : '取消'}} 确定 @@ -123,7 +123,8 @@ export default { }, checked: false, list: [], - idList: [] + idList: [], + onlyQuantity: false, } }, created() { @@ -305,9 +306,11 @@ export default { delTap() { // idList this.idList = [] + let quantity = 0 this.list.forEach((el) => { el.carItemList.forEach((good) => { if (good.checked) { + quantity = good.quantity this.idList.push(good.id) } }) @@ -319,6 +322,12 @@ export default { }) return } + // 单一纸品删除,数量为0时,提示用户确认后删除纸品 + if(this.idList.length == 1 && quantity == 0) { + this.onlyQuantity = true + }else { + this.onlyQuantity = false + } this.$refs.popup.open('center') }, confirmTap() {