pay-confirm.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 u-border-top" style="margin-top: 10rpx;padding-top: 40rpx;padding-bottom: 0;">
  38. <view class="left" style="font-size: 30rpx;" v-text="paySuccess?'现金交易':'您仍需支付'"></view>
  39. <view class="right text-bold" style="font-size: 40rpx;"><text class="price">{{info.bills.price || 0}}</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="center flex-direction " style="padding: 70rpx 0;" >
  44. <text class="text-gray text-sm margin-bottom-20">感谢使用联兑通,越用越优惠</text>
  45. <view @click="confirm" :class="paySuccess?'bg-green':'btn-bg-color'" class="cu-btn flex text-lg round"
  46. style="padding: 42rpx 0;width: 90%;">
  47. <text v-text="paySuccess&&confirmText?confirmText:'确认支付'"></text>
  48. </view>
  49. <view @click="cancel" :class="paySuccess?'text-gray':'text-base'" class=" payConfirm"
  50. style="margin-top: 30rpx;font-size: 30rpx;text-decoration: underline;">
  51. <text v-text="paySuccess&&cancelText?cancelText:'暂不支付'"></text>
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. props: {
  59. info: Object,
  60. type: String,
  61. confirmText: String,
  62. cancelText: String,
  63. },
  64. computed: {
  65. paySuccess: {
  66. get() {
  67. if (this.$isNotEmpty(this.type)) {
  68. return true
  69. }
  70. return false
  71. }
  72. },
  73. },
  74. data() {
  75. return {
  76. }
  77. },
  78. created() {
  79. },
  80. methods: {
  81. confirm() {
  82. this.$emit('confirm')
  83. },
  84. cancel() {
  85. this.$emit('cancel')
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="scss">
  91. .bg-green{
  92. background-color: #19be6b;
  93. color: #FFFFFF;
  94. }
  95. .info {
  96. display: flex;
  97. justify-content: center;
  98. align-items: center;
  99. flex-direction: column;
  100. image {
  101. width: 120rpx;
  102. height: 120rpx;
  103. border-radius: 50%;
  104. margin-bottom: 20rpx;
  105. }
  106. }
  107. .text-color {
  108. color: #353535;
  109. }
  110. .card {
  111. margin: 0 40rpx;
  112. padding: 40rpx;
  113. border-radius: 20rpx;
  114. background-color: #FFFFFF;
  115. .item {
  116. padding: 15rpx 0;
  117. display: flex;
  118. justify-content: space-between;
  119. font-size: 28rpx;
  120. .left {
  121. color: #353535;
  122. font-weight: 300;
  123. }
  124. .right {
  125. font-size: 30rpx;
  126. color: #353535;
  127. }
  128. }
  129. }
  130. .price::after {
  131. content: '元';
  132. margin-left: 6rpx;
  133. font-size: 0.8em;
  134. }
  135. .reduce::before {
  136. content: '-';
  137. margin-right: 10rpx;
  138. }
  139. </style>