PaymentView.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <view class="payment-view">
  3. <image
  4. class="payment-icon"
  5. src="@/static/icons/icon-payment.png"/>
  6. <view class="payment-info">
  7. <view class="flexc">
  8. <text class="payment-name">Pay-Per-Use</text>
  9. <view :class="'payment-status ' + info.paymentStatus" v-if="info.paymentStatus">{{info.paymentStatus}}</view>
  10. </view>
  11. <view class="payment-amount">{{(info.preAuthAmount || "S$50") + " Pre-Authorization"}}</view>
  12. </view>
  13. <i-icon
  14. v-if="false"
  15. name="arrow-right-s-line"
  16. size="48rpx"
  17. color="#333"/>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: "PaymentView",
  23. props: {
  24. info: {
  25. type: Object,
  26. default: () => ({})
  27. }
  28. },
  29. data() {
  30. return {
  31. };
  32. },
  33. mounted() {
  34. },
  35. methods: {
  36. }
  37. }
  38. </script>
  39. <style scoped>
  40. .payment-view {
  41. display: flex;
  42. padding: 32rpx;
  43. margin: 32rpx 32rpx 0;
  44. align-items: center;
  45. border-radius: 24rpx;
  46. padding-right: 24rpx;
  47. background-color: white;
  48. }
  49. .payment-icon {
  50. width: 65rpx;
  51. height: 65rpx;
  52. }
  53. .payment-info {
  54. flex: 1;
  55. padding: 0 32rpx;
  56. }
  57. .payment-name {
  58. color: #222;
  59. font-size: 32rpx;
  60. font-weight: bold;
  61. }
  62. .payment-amount {
  63. color: #009E81;
  64. font-size: 28rpx;
  65. padding-top: 8rpx;
  66. }
  67. .payment-status {
  68. color: #fff;
  69. font-size: 25rpx;
  70. border-radius: 12px;
  71. padding: 4px 10px;
  72. margin-left: 8rpx;
  73. transform: scale(0.8);
  74. background-color: #009E81;
  75. }
  76. .payment-status.FAILED,
  77. .payment-status.EXPIRED {
  78. background-color: #FF2222;
  79. }
  80. .payment-status.CANCELLED {
  81. background-color: #999;
  82. }
  83. .payment-status.PENDING {
  84. background-color: #7c9e0c;
  85. }
  86. </style>