hangingAmount.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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="40" 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. this.total += element.total
  50. }
  51. }
  52. })
  53. }
  54. };
  55. </script>
  56. <style lang="scss" scoped>
  57. .page {
  58. min-height: 100vh;
  59. background-color: #F9F9F9;
  60. .card {
  61. background-color: #FFFFFF;
  62. padding: 30rpx;
  63. margin-bottom: 20rpx;
  64. .text {
  65. color: #333333;
  66. font-size: 40rpx;
  67. margin-bottom: 15rpx;
  68. }
  69. .amount {
  70. color: #222222;
  71. font-size: 80rpx;
  72. font-weight: bold;
  73. }
  74. .msg {
  75. color: #999999;
  76. font-size: 30rpx;
  77. margin: 35rpx 0 15rpx 0;
  78. }
  79. }
  80. .item {
  81. display: flex;
  82. border-top: 1px solid #F0F0F0;
  83. background-color: #ffffff;
  84. padding: 40rpx 20rpx;
  85. &:first-child {
  86. border-top: none;
  87. }
  88. .avatar {
  89. margin-right: 10rpx;
  90. width: 15%;
  91. }
  92. .info {
  93. display: flex;
  94. flex-direction: column;
  95. width: 85%;
  96. .type_amount {
  97. display: flex;
  98. justify-content: space-between;
  99. margin-bottom: 10rpx;
  100. .type {
  101. color: #333333;
  102. font-size: 35rpx;
  103. font-weight: bold;
  104. }
  105. .amount {
  106. color: #333333;
  107. font-size: 30rpx;
  108. font-weight: bold;
  109. }
  110. }
  111. .date_time {
  112. display: flex;
  113. justify-content: space-between;
  114. .date {
  115. color: #999999;
  116. font-size: 24rpx;
  117. }
  118. .time {
  119. color: #999999;
  120. font-size: 24rpx;
  121. }
  122. }
  123. }
  124. }
  125. }
  126. </style>