index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view class="content-wrap">
  3. <view class="title-info">
  4. <view v-if="tranRecords.tradeNoType == '1'" class="name skyblue">
  5. <text>消费</text>
  6. </view>
  7. <view v-if="tranRecords.tradeNoType == '2'" class="name orange">
  8. <text>充值</text>
  9. </view>
  10. <view v-if="tranRecords.tradeNoType == '3'" class="name pink">
  11. <text>退款</text>
  12. </view>
  13. <view class="text">
  14. <text>{{tranRecords.remark}}</text>
  15. </view>
  16. <view class="money">
  17. <text v-if="tranRecords.tradeNoType == '2'">+</text>
  18. <text v-else>-</text>{{tranRecords.amount}}
  19. </view>
  20. </view>
  21. <view class="custom-line"></view>
  22. <view class="transaction-detail">
  23. <view class="td-v">
  24. <view class="td-name">
  25. <text>当前状态</text>
  26. </view>
  27. <view class="td-text">
  28. <text>已完成</text>
  29. </view>
  30. </view>
  31. <view class="td-v">
  32. <view class="td-name">
  33. <text>交易时间</text>
  34. </view>
  35. <view class="td-text">
  36. <text>{{tranRecords.createTime}}</text>
  37. </view>
  38. </view>
  39. <view class="td-v">
  40. <view class="td-name">
  41. <text>支付方式</text>
  42. </view>
  43. <view class="td-text">
  44. <text v-if="tranRecords.paymentModeDesc">{{tranRecords.paymentModeDesc}}</text>
  45. <text v-else>微信支付</text>
  46. </view>
  47. </view>
  48. <view class="td-v">
  49. <view class="td-name">
  50. <text>交易单号</text>
  51. </view>
  52. <view class="td-text">
  53. <text>{{tranRecords.transactionNo}}</text>
  54. </view>
  55. </view>
  56. <view class="td-v">
  57. <view class="td-name">
  58. <text>储值单号</text>
  59. </view>
  60. <view class="td-text">
  61. <text>{{tranRecords.tradeNo}}</text>
  62. </view>
  63. </view>
  64. <view class="td-v">
  65. <view class="td-name">
  66. <text>账户余额</text>
  67. </view>
  68. <view class="td-text">
  69. ¥<text v-if="tranRecords.afterBalance">{{tranRecords.afterBalance}}</text>
  70. <text v-else>0</text>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. export default {
  78. data() {
  79. return {
  80. tranRecords: {}
  81. }
  82. },
  83. onLoad(option) {
  84. this.tranRecords = JSON.parse(option.item);
  85. },
  86. methods: {
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. page,body{
  92. }
  93. .content-wrap{
  94. background: #fff;
  95. .title-info{
  96. text-align: center;
  97. padding-top: 30px ;
  98. font-family: PingFangSC-Regular, PingFang SC;
  99. .name{
  100. margin: 0 auto;
  101. width: 70px;
  102. height: 70px;
  103. color: #fff;
  104. border-radius: 35px;
  105. display: flex;
  106. justify-content: center;
  107. align-items: center;
  108. // background: hotpink;
  109. font-size: 16px;
  110. }
  111. .orange{
  112. background: #93D21A;
  113. }
  114. .skyblue{
  115. background: #ED569F;
  116. }
  117. .pink{
  118. background: #FFAF36;
  119. }
  120. .text{
  121. font-size: 14px;
  122. font-weight: 400;
  123. color: #666666;
  124. line-height: 22px;
  125. }
  126. .money{
  127. line-height: 26px;
  128. padding-bottom: 8px;
  129. font-size: 18px;
  130. font-weight: 600;
  131. color: #333333;
  132. }
  133. }
  134. .transaction-detail{
  135. margin:16px;
  136. padding-bottom: 16px;
  137. font-size: 14px;
  138. line-height: 26px;
  139. font-weight: 500;
  140. .td-v{
  141. display: flex;
  142. justify-content: space-between;
  143. .td-name{
  144. color: #999999 ;
  145. padding-right: 14px;
  146. font-weight: 500;
  147. }
  148. .td-value{
  149. color: #333333;
  150. }
  151. }
  152. }
  153. }
  154. .td-text{
  155. font-size: 26rpx;
  156. }
  157. </style>