cashList.vue 3.6 KB

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