Bladeren bron

bug 修复

lilei 4 jaren geleden
bovenliggende
commit
3695e7f821
3 gewijzigde bestanden met toevoegingen van 7 en 13 verwijderingen
  1. 2 1
      components/uni-coods/uni-coods.vue
  2. 4 4
      pages/cart/cart.vue
  3. 1 8
      pages/index/index.vue

+ 2 - 1
components/uni-coods/uni-coods.vue

@@ -67,9 +67,10 @@
 			},
 			// 加入购物车
 			addCart(item) {
-				console.log(item)
+				console.log('addCart0')
 				if(this.hasZgKucun(item)){
 					this.$bindClick(function(){
+						console.log('addCart1')
 						uni.$emit("addCart",{goodsNo:item.goodsNo,buyQty:1})
 					})
 				}else{

+ 4 - 4
pages/cart/cart.vue

@@ -120,8 +120,8 @@
 				toOrderButton: {
 					borderRadius:'100rpx',
 					fontSize:'30rpx',
-					width: '180rpx',
-					height: '60rpx'
+					width: '200rpx',
+					height: '80rpx'
 				},
 				checkAll: false,// 全选
 				isEdit: false, // 是否编辑模式
@@ -537,10 +537,10 @@ page{
 				margin-left: 10rpx;
 			}
 			&:first-child{
-				padding: 20upx;
+				padding: 10upx 20upx;
 			}
 			&:last-child{
-				padding: 20upx;
+				padding: 10upx 20upx;
 				font-size: 26upx;
 				> view{
 					padding-right: 30upx;

+ 1 - 8
pages/index/index.vue

@@ -198,6 +198,7 @@
 						this.$u.vuex('vuex_cartList', res.data)
 						uni.$emit('getCarListSuccess')
 					}
+					uni.hideLoading()
 				})
 			},
 			// 添加购物车
@@ -208,10 +209,6 @@
 				})
 				addGoodsToCart(item).then(res => {
 					if(res.status == 200){
-						uni.showToast({
-							title:"商品添加成功",
-							icon:"none"
-						})
 						// 刷新购物车
 						this.getCartList()
 					}else{
@@ -227,10 +224,6 @@
 				})
 				deleteGoodsFormCart({idList:ids}).then(res => {
 					if(res.status == 200){
-						uni.showToast({
-							title:"商品删除成功",
-							icon:"none"
-						})
 						// 刷新购物车
 						this.getCartList()
 					}else{