withdraw-log.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <!-- 提现记录 -->
  2. <template>
  3. <!-- 记录卡片 -->
  4. <view class="wallet-log-box u-p-b-30">
  5. <view class="log-list" v-for="item in withdrawLog" :key="item.id">
  6. <view class="head u-flex u-col-center u-row-between">
  7. <view class="title">提现至{{ item.apply_type_text }}</view>
  8. <view class="num">{{ item.money }} 元</view>
  9. </view>
  10. <view class="status-box item u-flex u-col-center u-row-between">
  11. <view class="item-title">申请状态</view>
  12. <view class="status-text" :style="{ color: stausMap[item.status] }">{{ item.status_text }}</view>
  13. </view>
  14. <view class="time-box item u-flex u-col-center u-row-between">
  15. <text class="item-title">账户信息</text>
  16. <view class="time u-ellipsis-1">{{ item.apply_info | applyInfoFilter }}</view>
  17. </view>
  18. <view class="time-box item u-flex u-col-center u-row-between">
  19. <text class="item-title">提现单号</text>
  20. <view class="time">{{ item.apply_sn }}</view>
  21. </view>
  22. <view class="time-box item u-flex u-col-center u-row-between">
  23. <text class="item-title">手续费</text>
  24. <view class="time">{{ item.charge_money }} 元</view>
  25. </view>
  26. <view class="time-box item u-flex u-col-center u-row-between">
  27. <text class="item-title">申请时间</text>
  28. <view class="time">{{ $u.timeFormat(item.createtime, 'yyyy.mm.dd hh:MM:ss') }}</view>
  29. </view>
  30. </view>
  31. <!-- 更多 -->
  32. <u-loadmore v-show="!isEmpty" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" />
  33. <!-- 空置页 -->
  34. <shopro-empty v-if="isEmpty" marginTop="300rpx" :image="$IMG_URL + '/imgs/empty/no_data.png'" tipText="暂无数据~"></shopro-empty>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. components: {},
  40. data() {
  41. return {
  42. withdrawLog: [],
  43. loadStatus: 'loadmore', //loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态
  44. currentPage: 1,
  45. lastPage: 1,
  46. isEmpty: false,
  47. stausMap: {
  48. 0: '#999',
  49. 1: '#EFAF41',
  50. 2: '#70C140',
  51. '-1': '#ED5B56'
  52. }
  53. };
  54. },
  55. computed: {},
  56. filters: {
  57. applyInfoFilter: function (value) {
  58. if (!value) return '-';
  59. return Object.values(value).join(' | ');
  60. }
  61. },
  62. onLoad() {
  63. this.getLog();
  64. },
  65. // 触底加载更多
  66. onReachBottom() {
  67. if (this.currentPage < this.lastPage) {
  68. this.currentPage += 1;
  69. this.getLog();
  70. }
  71. },
  72. methods: {
  73. // 确认提交表单
  74. getLog() {
  75. let that = this;
  76. that.loadStatus = 'loading';
  77. that.$http('money.withdrawLog', {
  78. page: that.currentPage
  79. }).then(res => {
  80. if (res.code === 1) {
  81. that.withdrawLog = [...that.withdrawLog, ...res.data.data];
  82. that.isEmpty = !that.withdrawLog.length;
  83. that.lastPage = res.data.last_page;
  84. that.loadStatus = that.currentPage < res.data.last_page ? 'loadmore' : 'nomore';
  85. }
  86. });
  87. }
  88. }
  89. };
  90. </script>
  91. <style lang="scss">
  92. // 记录卡片
  93. .log-list {
  94. min-height: 213rpx;
  95. background: #ffffff;
  96. margin-bottom: 10rpx;
  97. padding-bottom: 10rpx;
  98. .head {
  99. padding: 0 35rpx;
  100. height: 80rpx;
  101. border-bottom: 1rpx solid #eee;
  102. margin-bottom: 20rpx;
  103. .title {
  104. font-size: 28rpx;
  105. font-weight: 500;
  106. color: #333333;
  107. }
  108. .num {
  109. font-size: 28rpx;
  110. font-weight: 500;
  111. color: #7063d2;
  112. }
  113. }
  114. .item {
  115. padding: 0 30rpx 10rpx;
  116. .item-icon {
  117. color: #c0c0c0;
  118. font-size: 36rpx;
  119. margin-right: 8rpx;
  120. }
  121. .item-title {
  122. width: 180rpx;
  123. font-size: 24rpx;
  124. font-weight: 400;
  125. color: #c0c0c0;
  126. }
  127. .status-text {
  128. font-size: 24rpx;
  129. font-weight: 500;
  130. color: #05c3a1;
  131. }
  132. .time {
  133. font-size: 24rpx;
  134. font-weight: 400;
  135. color: #c0c0c0;
  136. }
  137. }
  138. }
  139. </style>