hangingAmount.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="page">
  3. <view class="card">
  4. <view class="text">即将到账</view>
  5. <view class="amount">{{ currency(total, {
  6. symbol: '',
  7. fromCents: true
  8. }).format() }}</view>
  9. <view class="msg">推广奖励与返利需要等平台结算期后才会到账</view>
  10. </view>
  11. <view class="item" v-for="item in list">
  12. <view class="avatar">
  13. <u-avatar size="40px" text="佣金"></u-avatar>
  14. </view>
  15. <view class="info">
  16. <view class="type_amount">
  17. <view class="type">推广用户奖励</view>
  18. <view class="amount">{{ currency(item.total, {
  19. symbol: '¥',
  20. fromCents: true
  21. }).format() }}</view>
  22. </view>
  23. <view class="date_time">
  24. <view class="date">{{ $u.timeFormat(item.createTime, "yyyy-mm-dd hh:MM") }}</view>
  25. <view class="time">预计{{ $u.timeFormat(item.estimatedTime, "yyyy-mm-dd") }}到账</view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import { listByWallet } from '@/api/wallet'
  33. import currency from "@/utils/currency"
  34. export default {
  35. data() {
  36. return {
  37. list: [],
  38. currency,
  39. total: 0
  40. };
  41. },
  42. methods: {
  43. },
  44. onShow() {
  45. listByWallet().then(({ content }) => {
  46. if (content) {
  47. this.list = content;
  48. for (const element of this.list) {
  49. if(element.receiptsType === 'WAIT'){
  50. this.total += element.total
  51. }
  52. }
  53. }
  54. })
  55. }
  56. };
  57. </script>
  58. <style lang="scss" scoped>
  59. .page {
  60. min-height: 100vh;
  61. background-color: #F9F9F9;
  62. .card {
  63. background-color: #FFFFFF;
  64. padding: 30rpx;
  65. margin-bottom: 20rpx;
  66. .text {
  67. color: #333333;
  68. font-size: 40rpx;
  69. margin-bottom: 15rpx;
  70. }
  71. .amount {
  72. color: #222222;
  73. font-size: 80rpx;
  74. font-weight: bold;
  75. }
  76. .msg {
  77. color: #999999;
  78. font-size: 30rpx;
  79. margin: 35rpx 0 15rpx 0;
  80. }
  81. }
  82. .item {
  83. display: flex;
  84. border-top: 1px solid #F0F0F0;
  85. background-color: #ffffff;
  86. padding: 40rpx 20rpx;
  87. &:first-child {
  88. border-top: none;
  89. }
  90. .avatar {
  91. margin-right: 10rpx;
  92. width: 15%;
  93. }
  94. .info {
  95. display: flex;
  96. flex-direction: column;
  97. width: 85%;
  98. .type_amount {
  99. display: flex;
  100. justify-content: space-between;
  101. margin-bottom: 10rpx;
  102. .type {
  103. color: #333333;
  104. font-size: 35rpx;
  105. font-weight: bold;
  106. }
  107. .amount {
  108. color: #333333;
  109. font-size: 30rpx;
  110. font-weight: bold;
  111. }
  112. }
  113. .date_time {
  114. display: flex;
  115. justify-content: space-between;
  116. .date {
  117. color: #999999;
  118. font-size: 24rpx;
  119. }
  120. .time {
  121. color: #999999;
  122. font-size: 24rpx;
  123. }
  124. }
  125. }
  126. }
  127. }
  128. </style>