pay-confirm.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view >
  3. <view class="center info" style="padding-bottom: 50rpx;">
  4. <image v-if="paySuccess" src="/static/icon/pay-success.png" mode=""></image>
  5. <image v-else :src="info.shop.cover" mode=""></image>
  6. <text v-text="paySuccess?'支付成功':info.shop.name" class="text-lg"
  7. style="color: #1C1C1C;font-size: 30rpx;"></text>
  8. </view>
  9. <view class="card" style="background-color: #FFFFFF;">
  10. <view class="flex flex-direction margin-bottom-40">
  11. <text class="text-lg text-bold" v-text="paySuccess?'支付成功':'支付确认'"></text>
  12. <text v-if="paySuccess" class=" text-sm margin-top-10"
  13. style="color: #999999;">您本次交易使用积分抵扣情况,具体如下:</text>
  14. <text v-else class=" text-sm margin-top-10" style="color: #999999;">您本次交易可使用积分抵扣,具体如下:</text>
  15. </view>
  16. <view class="item">
  17. <view class="left">商品价格</view>
  18. <view class="right price">{{info.bills.cost}}</view>
  19. </view>
  20. <view class="item">
  21. <view class="left">商家活动抵扣</view>
  22. <view class="right " >
  23. <text class="price reduce" :class="paySuccess?'text-color':'text-base'">{{info.bills.discount || 0}}</text>
  24. </view>
  25. </view>
  26. <view class="item">
  27. <view class="left">渠道积分抵扣</view>
  28. <view class="right" >
  29. <text class="price reduce" :class="paySuccess?'text-color':'text-base'">{{info.bills.pointNum || 0}}</text></view>
  30. </view>
  31. <view class="item">
  32. <view class="left">积分余额抵扣</view>
  33. <view class="right" >
  34. <text class="price reduce" :class="paySuccess?'text-color':'text-base'">{{info.bills.balanceNum || 0}}</text>
  35. </view>
  36. </view>
  37. <view class="item">
  38. <view class="left">平台交易服务费</view>
  39. <view class="right"><text class="price reduce" >{{info.bills.fee || 0}}</text></view>
  40. </view>
  41. <view class="item">
  42. <view class="left">积分交易手续费</view>
  43. <view class="right"><text class="price reduce" >{{info.bills.pointFee || 0}}</text></view>
  44. </view>
  45. <view class="item u-border-top" style="margin-top: 10rpx;padding-top: 40rpx;padding-bottom: 0;">
  46. <view class="left" style="font-size: 30rpx;" v-text="paySuccess?'现金交易':'您仍需支付'"></view>
  47. <view class="right text-bold" style="font-size: 40rpx;"><text class="price">{{info.bills.price || 0}}</text>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="center flex-direction" style="padding: 100rpx;">
  52. <text class="text-gray text-sm margin-bottom-20">感谢使用联兑通,越用越优惠</text>
  53. <view @click="confirm" :class="paySuccess?'bg-green':'btn-bg-color'" class="cu-btn flex text-lg round"
  54. style="padding: 42rpx 0;width: 90%;">
  55. <text v-text="paySuccess&&confirmText?confirmText:'确认支付'"></text>
  56. </view>
  57. <view @click="cancel" :class="paySuccess?'text-gray':'text-base'" class=" payConfirm"
  58. style="margin-top: 50rpx;font-size: 30rpx;text-decoration: underline;">
  59. <text v-text="paySuccess&&cancelText?cancelText:'暂不支付'"></text>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. props: {
  67. info: Object,
  68. type: String,
  69. confirmText: String,
  70. cancelText: String
  71. },
  72. computed: {
  73. paySuccess: {
  74. get() {
  75. if (this.$isNotEmpty(this.type)) {
  76. return true
  77. }
  78. return false
  79. }
  80. },
  81. },
  82. data() {
  83. return {
  84. }
  85. },
  86. methods: {
  87. confirm() {
  88. this.$emit('confirm')
  89. },
  90. cancel() {
  91. this.$emit('cancel')
  92. }
  93. }
  94. }
  95. </script>
  96. <style lang="scss">
  97. .bg-green{
  98. background-color: #19be6b;
  99. color: #FFFFFF;
  100. }
  101. .info {
  102. display: flex;
  103. justify-content: center;
  104. align-content: center;
  105. padding: 60rpx;
  106. flex-direction: column;
  107. image {
  108. width: 120rpx;
  109. height: 120rpx;
  110. border-radius: 50%;
  111. margin-bottom: 20rpx;
  112. }
  113. }
  114. .text-color {
  115. color: #353535;
  116. }
  117. .card {
  118. margin: 0 40rpx;
  119. border-radius: 20rpx;
  120. padding: 40rpx;
  121. background-color: #FFFFFF;
  122. .item {
  123. padding: 20rpx 0;
  124. display: flex;
  125. justify-content: space-between;
  126. font-size: 28rpx;
  127. .left {
  128. color: #353535;
  129. font-weight: 300;
  130. }
  131. .right {
  132. font-size: 30rpx;
  133. color: #353535;
  134. }
  135. }
  136. }
  137. .price::after {
  138. content: '元';
  139. margin-left: 6rpx;
  140. font-size: 0.8em;
  141. }
  142. .reduce::before {
  143. content: '-';
  144. margin-right: 10rpx;
  145. }
  146. </style>