index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view :style="viewColor">
  3. <!-- 选择送货方式 -->
  4. <view class="mask-box">
  5. <view class="bg" v-if="isShowDiscount"></view>
  6. <view class="mask-content animated" :class="{slideInUp:isShowDiscount}">
  7. <view class="title-bar">
  8. 优惠明细
  9. <view class="close" @click="closeShowBox"><text class="iconfont icon-guanbi"></text></view>
  10. </view>
  11. <view class="box">
  12. <view class="check-item">
  13. <view>商品售价:</view>
  14. <view class="radio">
  15. ¥{{couponData.total_price}}
  16. </view>
  17. </view>
  18. <view v-if="couponData.order_total_integral_price>0" class="check-item">
  19. <view>积分抵扣:</view>
  20. <view class="radio">
  21. -¥{{couponData.order_total_integral_price}}
  22. </view>
  23. </view>
  24. <view v-if="couponData.total_platform_coupon_price>0" class="check-item">
  25. <view>平台优惠金额:</view>
  26. <view class="radio">
  27. -¥{{ couponData.total_platform_coupon_price }}
  28. </view>
  29. </view>
  30. <view v-if="couponData.order_coupon_price>0" class="check-item">
  31. <view>店铺优惠金额:</view>
  32. <view class="radio">
  33. -¥{{ couponData.order_coupon_price }}
  34. </view>
  35. </view>
  36. <view v-if="couponData.order_svip_discount>0" class="check-item">
  37. <view>SVIP优惠金额:</view>
  38. <view class="radio">
  39. -¥{{ couponData.order_svip_discount }}
  40. </view>
  41. </view>
  42. <view v-if="couponData.total_coupon>0" class="check-item total">
  43. <view>共优惠:</view>
  44. <view class="radio">
  45. -¥{{ couponData.total_coupon}}
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. // +----------------------------------------------------------------------
  55. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  56. // +----------------------------------------------------------------------
  57. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  58. // +----------------------------------------------------------------------
  59. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  60. // +----------------------------------------------------------------------
  61. // | Author: CRMEB Team <admin@crmeb.com>
  62. // +----------------------------------------------------------------------
  63. import { mapGetters } from "vuex";
  64. export default{
  65. name:'Discount',
  66. props:{
  67. isShowDiscount:{
  68. type:Boolean,
  69. default:false
  70. },
  71. couponData:{
  72. type:Object,
  73. default:function(){
  74. return {}
  75. }
  76. }
  77. },
  78. computed: mapGetters(['viewColor']),
  79. data(){
  80. return {}
  81. },
  82. created() {},
  83. methods:{
  84. // 关闭配送方式弹窗
  85. closeShowBox(){
  86. this.$emit('close')
  87. },
  88. }
  89. }
  90. </script>
  91. <style lang="scss">
  92. .mask-box{
  93. .bg{
  94. z-index: 9;
  95. position: fixed;
  96. left: 0;
  97. bottom: 100rpx;
  98. width: 100%;
  99. height: 100%;
  100. background: rgba(0,0,0,0.5);
  101. }
  102. .mask-content{
  103. z-index: 10;
  104. position: fixed;
  105. left: 0;
  106. bottom: 100rpx;
  107. width: 100%;
  108. background-color: #f5f5f5;
  109. border-radius: 16rpx 16rpx 0 0;
  110. transform: translate3d(0, 200%, 0);
  111. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  112. .title-bar{
  113. position: relative;
  114. text-align: center;
  115. padding: 30rpx 0;
  116. margin-bottom: 20rpx;
  117. font-size: 32rpx;
  118. color: #282828;
  119. .close{
  120. position: absolute;
  121. right: 30rpx;
  122. top: 50%;
  123. transform: translateY(-50%);
  124. .iconfont{
  125. color: #8A8A8A;
  126. }
  127. }
  128. }
  129. .box{
  130. padding: 0 30rpx 60rpx;
  131. .check-item{
  132. display: flex;
  133. align-items: center;
  134. justify-content: space-between;
  135. height: 40rpx;
  136. margin-bottom: 50rpx;
  137. font-size: 28rpx;
  138. &.total{
  139. font-weight: bold;
  140. font-size: 32rpx;
  141. .radio{
  142. color: var(--view-priceColor);
  143. }
  144. }
  145. }
  146. }
  147. }
  148. }
  149. .animated {
  150. animation-duration: .3s
  151. }
  152. </style>