|
@@ -9,31 +9,23 @@
|
|
<view class="goods-item">
|
|
<view class="goods-item">
|
|
<view class="good-row">
|
|
<view class="good-row">
|
|
<view>
|
|
<view>
|
|
- <view class="shop">
|
|
|
|
- <view class="shop-icon">
|
|
|
|
- <uni-icons type="shop" color="#0081ff" size="26"></uni-icons>
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <text style="font-size: 35rpx; margin-left: 8rpx;">{{item.goodsName}}</text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="status">
|
|
|
|
- <uni-icons type="trash" color="red" size="30"></uni-icons>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="goods-item">
|
|
|
|
- <view class="good-row">
|
|
|
|
- <view>
|
|
|
|
<u--image radius="10" :showLoading="true" :src="item.goodsImg" width="250rpx"
|
|
<u--image radius="10" :showLoading="true" :src="item.goodsImg" width="250rpx"
|
|
height="210rpx"></u--image>
|
|
height="210rpx"></u--image>
|
|
</view>
|
|
</view>
|
|
<view class="des">
|
|
<view class="des">
|
|
- <view style="font-size: 34rpx; height: 100rpx;">{{item.goodsName}}</view>
|
|
|
|
|
|
+ <view style="font-size: 34rpx; height: 100rpx; display: flex;">
|
|
|
|
+ <view style="width: 300rpx;">
|
|
|
|
+ {{item.goodsName}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="status" @click="cleanCart(item.id)">
|
|
|
|
+ <uni-icons type="trash" color="grey" size="30"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<!-- <view style="font-size: 34rpx;">[老板力荐]鲜活小龙虾(帮剪头去虾线)约250g/份</view> -->
|
|
<!-- <view style="font-size: 34rpx;">[老板力荐]鲜活小龙虾(帮剪头去虾线)约250g/份</view> -->
|
|
<view class="subtit">
|
|
<view class="subtit">
|
|
<view class="price">¥{{item.totalPrice}}</view>
|
|
<view class="price">¥{{item.totalPrice}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -67,6 +59,26 @@
|
|
this.cartList = res.data.data;
|
|
this.cartList = res.data.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
+ scrolltolower() {
|
|
|
|
+ this.getCartList()
|
|
|
|
+ },
|
|
|
|
+ //
|
|
|
|
+ cleanCart(id) {
|
|
|
|
+ this.http.request({
|
|
|
|
+ url: '/level-one-server/app/TbGoodsCart/cleanCart',
|
|
|
|
+ data: {id: 1460500735619366940},
|
|
|
|
+ contentType: 'application/json; charset=utf-8',
|
|
|
|
+ method: 'POST',
|
|
|
|
+ success: res => {
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.msg
|
|
|
|
+ });
|
|
|
|
+ }, 1000)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ console.log( id + "类型"+ typeof id)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -99,10 +111,10 @@
|
|
}
|
|
}
|
|
|
|
|
|
.status {
|
|
.status {
|
|
- width: 200rpx;
|
|
|
|
|
|
+ width: 100rpx;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- justify-content: flex-end;
|
|
|
|
|
|
+ // justify-content: flex-end;
|
|
}
|
|
}
|
|
|
|
|
|
.des {
|
|
.des {
|
|
@@ -130,7 +142,7 @@
|
|
}
|
|
}
|
|
|
|
|
|
.item-box {
|
|
.item-box {
|
|
- height: 370rpx;
|
|
|
|
|
|
+ height: 280rpx;
|
|
width: 85%;
|
|
width: 85%;
|
|
padding: 30rpx;
|
|
padding: 30rpx;
|
|
border: 1rpx #888 solid;
|
|
border: 1rpx #888 solid;
|