<template>
|
<view class="cart">
|
<view class="cart_head">
|
<text>共2件商品</text>
|
<view class="cart_head_edit">编辑</view>
|
</view>
|
<view class="cart_list">
|
<uni-swipe-action>
|
<uni-swipe-action-item>
|
<view class="cart_list_item">
|
<view class="rode">
|
<image src="@/static/icon/cart_ic_select_grey@2x.png" mode="widthFix"></image>
|
</view>
|
<image class="shopImge" src="@/static/uni.png" mode="widthFix"></image>
|
<view class="right">
|
<view class="right_box">
|
<view class="right_title">清澄白河马克杯-节日版定制清澄白河马克杯-节日版定制马克杯-节日版定制</view>
|
<view class="right_guige">白色</view>
|
</view>
|
<view class="right_price">
|
<view class="right_price_left">
|
<text>¥</text>
|
<text>179</text>
|
<text>.98</text>
|
</view>
|
<uni-number-box @change="changeValue" />
|
</view>
|
</view>
|
</view>
|
<template v-slot:right>
|
<view class="dele" @click="dele"><text>删除</text></view>
|
</template>
|
</uni-swipe-action-item>
|
</uni-swipe-action>
|
</view>
|
<view class="cart_footer">
|
<view class="cart_footer_role">
|
<image src="@/static/icon/cart_ic_select_grey@2x.png" mode="widthFix"></image>
|
<text>全选</text>
|
</view>
|
<view class="cart_footer_submit">
|
<view class="cart_footer_submit_price">
|
<view class="label">合计:</view>
|
<view class="price">
|
<text>¥</text>
|
<text>179</text>
|
<text>.00</text>
|
</view>
|
</view>
|
<view class="cart_footer_submit_btn">结算</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
|
}
|
},
|
methods:{
|
onClick(e){
|
console.log('点击了'+(e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮')
|
},
|
swipeChange(e,index){
|
console.log('当前状态:'+ e +',下标:' + index)
|
},
|
changeValue(e) {
|
console.log(e)
|
},
|
dele() {
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.cart {
|
width: 100%;
|
.cart_head {
|
width: 100%;
|
padding: 0 32rpx;
|
height: 100rpx;
|
box-sizing: border-box;
|
background: #FFFFFF;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
border-radius: 12rpx;
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #000000;
|
}
|
.cart_head_edit {
|
width: 98rpx;
|
height: 44rpx;
|
line-height: 44rpx;
|
text-align: center;
|
background: #F9F9F9;
|
border-radius: 56rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #000000;
|
}
|
}
|
.cart_list {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.dele {
|
margin-top: 16rpx;
|
width: 138rpx;
|
height: 270rpx;
|
line-height: 270rpx;
|
text-align: center;
|
background: #D20A0A;
|
font-size: 30rpx;
|
font-family: PingFang SC-Bold, PingFang SC;
|
font-weight: bold;
|
color: #FFFFFF;
|
border-radius: 0rpx 12rpx 12rpx 0rpx;
|
}
|
.cart_list_item {
|
width: 100%;
|
height: 270rpx;
|
background: #FFFFFF;
|
border-radius: 12rpx;
|
margin-top: 16rpx;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
display: flex;
|
align-items: center;
|
.rode {
|
width: 32rpx;
|
height: 32rpx;
|
margin-right: 26rpx;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.shopImge {
|
width: 190rpx;
|
height: 190rpx;
|
border-radius: 12rpx;
|
margin-right: 20rpx;
|
}
|
.right {
|
width: 420rpx;
|
height: 190rpx;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
.right_box {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.right_title {
|
width: 100%;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
display: -webkit-box;
|
-webkit-line-clamp: 2;
|
-webkit-box-orient: vertical;
|
font-size: 28rpx;
|
font-family: PingFang SC-Bold, PingFang SC;
|
font-weight: bold;
|
color: #333333;
|
}
|
.right_guige {
|
font-size: 24rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #666666;
|
margin-top: 14rpx;
|
}
|
}
|
.right_price {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.right_price_left {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 11rpx;
|
}
|
&:nth-child(2) {
|
font-size: 40rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
}
|
&:nth-child(3) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 11rpx;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
.cart_footer {
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
width: 100%;
|
padding: 20rpx 32rpx calc(20rpx + env(safe-area-inset-bottom)) 32rpx;
|
background-color: #FFFFFF;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.cart_footer_role {
|
display: flex;
|
align-items: center;
|
image {
|
width: 32rpx;
|
height: 32rpx;
|
margin-right: 12rpx;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
}
|
}
|
.cart_footer_submit {
|
display: flex;
|
align-items: center;
|
.cart_footer_submit_price {
|
display: flex;
|
align-items: center;
|
.label {
|
font-size: 28rpx;
|
font-family: PingFang SC-Bold, PingFang SC;
|
font-weight: bold;
|
color: #333333;
|
margin-top: 11rpx;
|
}
|
.price {
|
display: flex;
|
align-items: center;
|
text {
|
&:nth-child(1) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 11rpx;
|
}
|
&:nth-child(2) {
|
font-size: 40rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
}
|
&:nth-child(3) {
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 11rpx;
|
}
|
}
|
}
|
}
|
.cart_footer_submit_btn {
|
width: 184rpx;
|
height: 64rpx;
|
line-height: 64rpx;
|
text-align: center;
|
background: linear-gradient(90deg, #D95A5A 0%, #D20A0A 100%);
|
border-radius: 56rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #FFFFFF;
|
margin-left: 18rpx;
|
}
|
}
|
}
|
}
|
</style>
|