pay-confirm.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view >
  3. <view class="center info" style="padding: 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" >
  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: 70rpx 0;" >
  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: 30rpx;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. created() {
  87. },
  88. methods: {
  89. confirm() {
  90. this.$emit('confirm')
  91. },
  92. cancel() {
  93. this.$emit('cancel')
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="scss">
  99. .bg-green{
  100. background-color: #19be6b;
  101. color: #FFFFFF;
  102. }
  103. .info {
  104. display: flex;
  105. justify-content: center;
  106. align-items: center;
  107. flex-direction: column;
  108. image {
  109. width: 120rpx;
  110. height: 120rpx;
  111. border-radius: 50%;
  112. margin-bottom: 20rpx;
  113. }
  114. }
  115. .text-color {
  116. color: #353535;
  117. }
  118. .card {
  119. margin: 0 40rpx;
  120. padding: 40rpx;
  121. border-radius: 20rpx;
  122. background-color: #FFFFFF;
  123. .item {
  124. padding: 15rpx 0;
  125. display: flex;
  126. justify-content: space-between;
  127. font-size: 28rpx;
  128. .left {
  129. color: #353535;
  130. font-weight: 300;
  131. }
  132. .right {
  133. font-size: 30rpx;
  134. color: #353535;
  135. }
  136. }
  137. }
  138. .price::after {
  139. content: '元';
  140. margin-left: 6rpx;
  141. font-size: 0.8em;
  142. }
  143. .reduce::before {
  144. content: '-';
  145. margin-right: 10rpx;
  146. }
  147. </style>