withdraw-log.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <s-layout class="widthdraw-log-wrap" title="提现记录">
  3. <!-- 记录卡片 -->
  4. <view class="wallet-log-box ss-p-b-30">
  5. <view class="log-list" v-for="item in state.pagination.data" :key="item">
  6. <view class="head ss-flex ss-col-center ss-row-between">
  7. <view class="title">{{
  8. item.withdraw_type === 'bank'
  9. ? '提现至银行卡'
  10. : item.withdraw_type === 'alipay'
  11. ? '提现至支付宝'
  12. : '提现至微信'
  13. }}</view>
  14. <view
  15. class="num"
  16. :class="
  17. item.status === -1
  18. ? 'danger-color'
  19. : item.status === 2
  20. ? 'success-color'
  21. : 'warning-color'
  22. "
  23. >{{ item.amount }}元</view
  24. >
  25. </view>
  26. <view class="status-box item ss-flex ss-col-center ss-row-between">
  27. <view class="item-title">申请状态</view>
  28. <view
  29. class="status-text"
  30. :class="
  31. item.status === -1
  32. ? 'danger-color'
  33. : item.status === 2
  34. ? 'success-color'
  35. : 'warning-color'
  36. "
  37. >{{ item.status_text }}</view
  38. >
  39. </view>
  40. <view class="time-box item ss-flex ss-col-center ss-row-between">
  41. <text class="item-title">账户信息</text>
  42. <view class="time ss-ellipsis-1" v-if="item.withdraw_type === 'bank'"
  43. >{{ item.withdraw_info_hidden.开户行 }}[{{ item.withdraw_info_hidden.银行卡号 }}]</view
  44. >
  45. <view class="time ss-ellipsis-1" v-if="item.withdraw_type === 'alipay'">
  46. 支付宝[{{ item.withdraw_info_hidden.支付宝账户 }}]
  47. </view>
  48. <view class="time ss-ellipsis-1" v-if="item.withdraw_type === 'wechat'">微信零钱</view>
  49. </view>
  50. <view class="time-box item ss-flex ss-col-center ss-row-between">
  51. <text class="item-title">提现单号</text>
  52. <view class="time"> {{ item.withdraw_sn }} </view>
  53. </view>
  54. <view class="time-box item ss-flex ss-col-center ss-row-between">
  55. <text class="item-title">手续费</text>
  56. <view class="time">{{ item.charge_fee }}元</view>
  57. </view>
  58. <view class="time-box item ss-flex ss-col-center ss-row-between">
  59. <text class="item-title">申请时间</text>
  60. <view class="time"> {{ item.create_time }}</view>
  61. </view>
  62. </view>
  63. </view>
  64. <s-empty
  65. v-if="state.pagination.total === 0"
  66. icon="/static/comment-empty.png"
  67. text="暂无提现记录"
  68. ></s-empty>
  69. <uni-load-more
  70. v-if="state.pagination.total > 0"
  71. :status="state.loadStatus"
  72. :content-text="{
  73. contentdown: '上拉加载更多',
  74. }"
  75. @tap="loadmore"
  76. />
  77. </s-layout>
  78. </template>
  79. <script setup>
  80. import { reactive } from 'vue';
  81. import sheep from '@/sheep';
  82. import { onLoad, onReachBottom } from '@dcloudio/uni-app';
  83. import _ from 'lodash';
  84. const state = reactive({
  85. currentTab: 0,
  86. pagination: {
  87. data: [],
  88. current_page: 1,
  89. total: 1,
  90. last_page: 1,
  91. },
  92. loadStatus: '',
  93. });
  94. async function getList(page = 1, list_rows = 6) {
  95. const res = await sheep.$api.pay.withdraw.list({ list_rows, page });
  96. if (res.error === 0) {
  97. let logList = _.concat(state.pagination.data, res.data.data);
  98. state.pagination = {
  99. ...res.data,
  100. data: logList,
  101. };
  102. if (state.pagination.current_page < state.pagination.last_page) {
  103. state.loadStatus = 'more';
  104. } else {
  105. state.loadStatus = 'noMore';
  106. }
  107. }
  108. }
  109. // 加载更多
  110. function loadmore() {
  111. if (state.loadStatus !== 'noMore') {
  112. getList(state.pagination.current_page + 1);
  113. }
  114. }
  115. onLoad(() => {
  116. getList();
  117. });
  118. onReachBottom(() => {
  119. loadmore();
  120. });
  121. </script>
  122. <style lang="scss" scoped>
  123. // 记录卡片
  124. .log-list {
  125. min-height: 213rpx;
  126. background: $white;
  127. margin-bottom: 10rpx;
  128. padding-bottom: 10rpx;
  129. .head {
  130. padding: 0 35rpx;
  131. height: 80rpx;
  132. border-bottom: 1rpx solid $gray-e;
  133. margin-bottom: 20rpx;
  134. .title {
  135. font-size: 28rpx;
  136. font-weight: 500;
  137. color: $dark-3;
  138. }
  139. .num {
  140. font-size: 28rpx;
  141. font-weight: 500;
  142. }
  143. }
  144. .item {
  145. padding: 0 30rpx 10rpx;
  146. .item-icon {
  147. color: $gray-d;
  148. font-size: 36rpx;
  149. margin-right: 8rpx;
  150. }
  151. .item-title {
  152. width: 180rpx;
  153. font-size: 24rpx;
  154. font-weight: 400;
  155. color: #666666;
  156. }
  157. .status-text {
  158. font-size: 24rpx;
  159. font-weight: 500;
  160. }
  161. .time {
  162. font-size: 24rpx;
  163. font-weight: 400;
  164. color: #c0c0c0;
  165. }
  166. }
  167. }
  168. .warning-color {
  169. color: #faad14;
  170. }
  171. .danger-color {
  172. color: #ff4d4f;
  173. }
  174. .success-color {
  175. color: #67c23a;
  176. }
  177. </style>