Ver Fonte

购物车加减数量提示修改

LXT-NJ\Admin há 1 ano atrás
pai
commit
cf4cbcfcff

+ 6 - 6
pages/gouwuche/index.vue

@@ -216,12 +216,12 @@
 			// 按钮减
 			jian(data) {
 				// console.log(data);
-				if (data.buy <= 1) {
-					this.$refs.toast.show({
-						model: 'warn',
-						label: '该商品不能减少了哟~'
-					})
-				}
+				// if (data.buy <= 1) {
+				// 	this.$refs.toast.show({
+				// 		model: 'warn',
+				// 		label: '该商品不能减少了哟~'
+				// 	})
+				// }
 				this.number = -1;
 			},
 			// 按钮加

+ 6 - 0
tm-vuetify/components/tm-cartCellListFood/tm-cartCellListFood.vue

@@ -311,6 +311,12 @@
 			},
 			jian(data) {
 				console.log(data,'2');
+				if(data.buy<=1){
+					uni.showToast({
+						title:'该商品不能减少了哟~',
+						icon:"warning"
+					})
+				}
 				const buyNum = this.cNum;
 				if (buyNum <= 0) {
 					this.cart_num = 1;