recharge-record.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="recharge-record-container">
  3. <JHeader title="平台充值流水记录" width="50" height="50" style="padding: 24upx 0 10upx;background-color: #f5f5f5;"></JHeader>
  4. <view style="padding: 40upx 26upx;">
  5. <view style="font-size: 34upx;font-weight: bold;">明细统计</view>
  6. <view v-if="rechargeRecordList && rechargeRecordList.length" style="margin-top: 40upx;">
  7. <view
  8. v-for="(item, index) in rechargeRecordList" :key="index"
  9. style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 48upx;"
  10. >
  11. <view style="display: flex;align-items: center;">
  12. <view
  13. style="width: 76upx;height: 76upx;text-align: center;border-radius: 50%;overflow: hidden;font-size: 38upx;font-weight: bold;color: #ffffff;"
  14. >
  15. <view
  16. v-if="item.actionType === 1"
  17. style="width: 100%;height: 100%;background-color: #ef530e;line-height: 76upx;"
  18. >
  19. </view>
  20. <view
  21. v-else-if="item.actionType === 2"
  22. style="width: 100%;height: 100%;background-color: #439544;line-height: 76upx;"
  23. >
  24. </view>
  25. <view
  26. v-else-if="item.actionType === 3"
  27. style="width: 100%;height: 100%;background-color: #499cca;line-height: 76upx;"
  28. >
  29. </view>
  30. <view v-else>?</view>
  31. </view>
  32. <view style="margin-left: 12upx;">
  33. <view style="font-weight: bold;color: #222229;">
  34. <text v-if="item.actionType === 1">充值</text>
  35. <text v-else-if="item.actionType === 2">提现</text>
  36. <text v-else-if="item.actionType === 3">订单</text>
  37. <text v-else>--</text>
  38. </view>
  39. <view style="font-size: 28upx;color: #888889;">{{ item.createTime }}</view>
  40. </view>
  41. </view>
  42. <view style="text-align: right;">
  43. <view style="font-weight: bold;color: #222229;">{{ item.fee }}元</view>
  44. <view style="font-size: 28upx;color: #888889;">
  45. <text v-if="item.status === 0">未完成</text>
  46. <text v-else-if="item.status === 1">处理完成</text>
  47. <text v-else>--</text>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view style="padding-bottom: 45upx;">
  53. <LoadingMore
  54. :status="!isEmpty && !rechargeRecordList.length
  55. ? 'loading' : !isEmpty && rechargeRecordList.length && (rechargeRecordList.length >= rechargeRecordTotal) ? 'no-more' : ''"
  56. >
  57. </LoadingMore>
  58. <tui-no-data v-if="isEmpty" :fixed="false" style="margin-top: 60upx;">暂无数据</tui-no-data>
  59. </view>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import { getByAllBuyerUserRechargeLogApi } from '../../../api/anotherTFInterface'
  65. export default {
  66. name: 'RechargeRecord',
  67. data() {
  68. return {
  69. isEmpty: false,
  70. rechargeRecordTotal: 0,
  71. rechargeRecordList: [],
  72. queryInfo: {
  73. amounts: '',
  74. page: 1,
  75. pageSize: 20
  76. }
  77. }
  78. },
  79. onLoad(options) {
  80. this.getRechargeRecordList()
  81. },
  82. methods: {
  83. getRechargeRecordList(isLoadmore) {
  84. uni.showLoading()
  85. getByAllBuyerUserRechargeLogApi(this.queryInfo)
  86. .then((res) => {
  87. this.rechargeRecordTotal = res.data.total
  88. if (isLoadmore) {
  89. this.rechargeRecordList.push(...res.data.records)
  90. } else {
  91. this.rechargeRecordList = res.data.records
  92. }
  93. this.isEmpty = this.rechargeRecordList.length === 0
  94. uni.hideLoading()
  95. })
  96. .catch((e) => {
  97. uni.hideLoading()
  98. })
  99. }
  100. },
  101. onReachBottom() {
  102. if (this.rechargeRecordList.length < this.rechargeRecordTotal) {
  103. ++this.queryInfo.page
  104. this.getRechargeRecordList(true)
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="less" scoped>
  110. .recharge-record-container {
  111. position: relative;
  112. min-height: 100vh;
  113. box-sizing: border-box;
  114. }
  115. </style>