|
@@ -9,15 +9,17 @@
|
|
|
></header-cart>
|
|
|
<template v-if="!isEmpty">
|
|
|
<template v-if="!isshowDelbtn">
|
|
|
- <!-- 商品统计 / 批量删除商品 -->
|
|
|
- <view class="cart-top" :class="{ fixed: cartTopFixed }" :style="[cartTop]">
|
|
|
- <view class="count">共{{ kindCount }}件商品</view>
|
|
|
- <view class="btn" @click="showDelManager">删除</view>
|
|
|
- </view>
|
|
|
- <!-- TODO -->
|
|
|
- <view class="receive-coupon">
|
|
|
- <view class="tip-text">{{ couponTipText }}</view>
|
|
|
- <view class="btn" @click="receiveCoupon">领券</view>
|
|
|
+ <view :class="{ fixed: cartTopFixed }" :style="[cartTop]">
|
|
|
+ <!-- 商品统计 / 批量删除商品 -->
|
|
|
+ <view class="cart-top">
|
|
|
+ <view class="count">共{{ kindCount }}件商品</view>
|
|
|
+ <view class="btn" @click="showDelManager">删除</view>
|
|
|
+ </view>
|
|
|
+ <!-- TODO -->
|
|
|
+ <view class="receive-coupon" v-if="showReceiveCouponButton">
|
|
|
+ <view class="tip-text">{{ couponTipText }}</view>
|
|
|
+ <view class="btn" @click="receiveCoupon">领券</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<!-- 购物车列表 -->
|
|
@@ -51,7 +53,10 @@
|
|
|
<template v-if="!isshowDelbtn">
|
|
|
<view class="center">
|
|
|
<view class="row">
|
|
|
- <text>总价:</text> <text class="total-price">¥{{ allPrice | formatPrice }}</text>
|
|
|
+ <text>总价:</text> <text class="total-price">
|
|
|
+ <text>¥{{ allPrice | formatPrice }}</text>
|
|
|
+ <text class="delete">¥9999.99</text>
|
|
|
+ </text>
|
|
|
</view>
|
|
|
<!-- TODO -->
|
|
|
<view class="row" v-if="currentCouponIndex > -1 && currentCoupon">
|
|
@@ -108,7 +113,9 @@
|
|
|
<text>优惠券</text> <text class="red">-¥{{ currentCoupon.couponAmount | formatPrice }}</text>
|
|
|
</view>
|
|
|
<view class="row total">
|
|
|
- <text>总计</text> <text>¥{{ finallyPrice | formatPrice }}</text>
|
|
|
+ <text>总计</text>
|
|
|
+ <text>¥{{ finallyPrice | formatPrice }}</text>
|
|
|
+ <text class="delete">9999.99</text>
|
|
|
</view>
|
|
|
<view class="tip"> 实际订单金额以结算页为准 </view>
|
|
|
</view>
|
|
@@ -230,7 +237,11 @@ export default {
|
|
|
let paddingTop = this.CustomBar
|
|
|
let paddingBottom = 100
|
|
|
if (this.cartTopFixed) {
|
|
|
- paddingTop += 40
|
|
|
+ if(this.showReceiveCouponButton){
|
|
|
+ paddingTop += 85
|
|
|
+ }else{
|
|
|
+ paddingTop += 40
|
|
|
+ }
|
|
|
}
|
|
|
if (this.isIphoneX) {
|
|
|
paddingBottom += 40
|
|
@@ -294,6 +305,10 @@ export default {
|
|
|
tabs.push({ name: '可领取优惠券' })
|
|
|
}
|
|
|
return tabs
|
|
|
+ },
|
|
|
+ showReceiveCouponButton(){
|
|
|
+ // return this.ableCouponList.length > 0 || this.receiveCouponList.length > 0
|
|
|
+ return true
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
@@ -576,6 +591,12 @@ export default {
|
|
|
&.hasPaddingTop {
|
|
|
padding-top: 80rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .fixed {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 9999;
|
|
|
+ }
|
|
|
+
|
|
|
.cart-top {
|
|
|
flex: 0;
|
|
|
display: flex;
|
|
@@ -586,10 +607,7 @@ export default {
|
|
|
height: 80rpx;
|
|
|
background: #f7f7f7;
|
|
|
box-sizing: border-box;
|
|
|
- &.fixed {
|
|
|
- position: fixed;
|
|
|
- z-index: 9999;
|
|
|
- }
|
|
|
+
|
|
|
.count {
|
|
|
font-size: 30rpx;
|
|
|
color: #333333;
|
|
@@ -664,6 +682,13 @@ export default {
|
|
|
color: #333333;
|
|
|
.total-price {
|
|
|
color: #ff457b;
|
|
|
+ .delete{
|
|
|
+ font-size: 20rpx;
|
|
|
+ color: #999999;
|
|
|
+ text-decoration: line-through;
|
|
|
+ font-weight: normal;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
&:nth-child(2) {
|
|
@@ -757,6 +782,13 @@ export default {
|
|
|
&.total {
|
|
|
font-size: 30rpx;
|
|
|
font-weight: 600;
|
|
|
+ .delete{
|
|
|
+ font-size: 20rpx;
|
|
|
+ color: #999999;
|
|
|
+ text-decoration: line-through;
|
|
|
+ font-weight: normal;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.tip {
|