cashList.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view style="text-align: left">
  3. <view v-for="(item, index) in list" :key="index" class="item">
  4. <view>
  5. <view style="margin-bottom: 8upx;text-align: right;">
  6. <text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==1"> 提现成功</text>
  7. <text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==0"> 提现中</text>
  8. <text style="margin-bottom: 8upx;color: #FF332F" v-if="item.state==-1"> 提现失败</text>
  9. </view>
  10. <view style="color: #999999;font-size: 28upx;">
  11. <view v-if="item.classify == 1">
  12. <view style="margin-bottom: 8upx">支付宝账号 {{ item.zhifubao }}</view>
  13. <view style="margin-bottom: 8upx">支付宝姓名 {{ item.zhifubaoName }}</view>
  14. <view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
  15. </view>
  16. <view v-if="item.classify == 2">
  17. <view>微信提现</view>
  18. <view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
  19. </view>
  20. <view style="margin-bottom: 8upx" v-if="item.state==1">成功时间 {{ item.outAt }}</view>
  21. <view style="margin-bottom: 8upx;color: #FF2638" v-if="item.state==-1">失败原因:{{item.refund}}</view>
  22. <view style="margin-bottom: 8upx;text-align: right;">
  23. <!-- 提现金额: -->
  24. <text style="color: #FF332F;font-size: 32upx;font-weight: 600">¥{{ item.money }}</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 加载更多提示 -->
  30. <view class="s-col is-col-24" v-if="list.length > 0">
  31. <load-more :loadingType="loadingType" :contentText="contentText"></load-more>
  32. </view>
  33. <!-- 加载更多提示 -->
  34. <empty v-if="list.length == 0" des="暂无数据"></empty>
  35. </view>
  36. </template>
  37. <script>
  38. import empty from '@/components/empty.vue'
  39. export default {
  40. components: {
  41. empty
  42. },
  43. data() {
  44. return {
  45. page: 1,
  46. size: 10,
  47. list: [],
  48. loadingType: 0,
  49. scrollTop: false,
  50. contentText: {
  51. contentdown: '上拉显示更多',
  52. contentrefresh: '正在加载...',
  53. contentnomore: '没有更多数据了'
  54. }
  55. };
  56. },
  57. onLoad: function(e) {
  58. this.$queue.showLoading('加载中...');
  59. this.getMoney();
  60. },
  61. onPageScroll: function(e) {
  62. this.scrollTop = e.scrollTop > 200;
  63. },
  64. methods: {
  65. getMoney(type) {
  66. this.loadingType = 1;
  67. let userId = this.$queue.getData('userId');
  68. let data = {
  69. page: this.page,
  70. limit: this.size,
  71. userId: userId
  72. };
  73. this.$Request.getT('/app/cash/selectPayDetails', data).then(res => {
  74. if (res.code === 0) {
  75. if (this.page === 1) {
  76. this.list = [];
  77. }
  78. res.data.list.forEach(d => {
  79. // if (d.state === -1) {
  80. // d.state = '已退款';
  81. // } else if (d.state === 0) {
  82. // d.state = '提现中';
  83. // } else if (d.state === 1) {
  84. // d.state = '提现成功';
  85. // }
  86. this.list.push(d);
  87. });
  88. if (res.data.list.length === this.size) {
  89. this.loadingType = 0;
  90. } else {
  91. this.loadingType = 3;
  92. }
  93. } else {
  94. this.loadingType = 2;
  95. }
  96. uni.hideLoading();
  97. if (type === 'Refresh') {
  98. uni.stopPullDownRefresh(); // 停止刷新
  99. }
  100. });
  101. }
  102. },
  103. onLoad: function(e) {
  104. this.getMoney();
  105. },
  106. onReachBottom: function() {
  107. this.page = this.page + 1;
  108. this.getMoney();
  109. },
  110. onPullDownRefresh: function() {
  111. this.page = 1;
  112. this.getMoney('Refresh');
  113. }
  114. };
  115. </script>
  116. <style lang="scss" scoped>
  117. // @import '../../static/css/index.css';
  118. page {
  119. background: #ffffff;
  120. }
  121. .item {
  122. background: white;
  123. padding: 32rpx;
  124. margin: 32rpx;
  125. font-size: 28rpx;
  126. box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
  127. border-radius: 16upx;
  128. }
  129. </style>