records.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <view>
  3. <mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption"
  4. :up="upOption">
  5. <view v-for="(item, index) in list" :key="index" class="flex align-center justify-between padding-sm bg-white margin-20 padding-20">
  6. <view class="padding-lr">
  7. <view class="title" style="display: flex;">
  8. 渠道代理提现
  9. <text v-if="item.withdrawStatus=='WAITING'" style="font-size: 28rpx;color: #ff9900;padding-left: 20rpx;font-weight: 500;">处理中</text>
  10. <text v-if="item.withdrawStatus=='DONE'" style="font-size: 28rpx;color: #19be6b;padding-left: 20rpx;font-weight: 500;">已处理</text>
  11. <view v-if="item.withdrawStatus=='FAIL'" style="font-size: 28rpx;color: #F3484E;padding-left: 20rpx;font-weight: 500;">
  12. <text style="margin-right: 6rpx;">提现失败</text>
  13. <u-icon name="question-circle" @click="toast(item.failReason)"></u-icon>
  14. </view>
  15. </view>
  16. <view class="padding-top-sm" style="font-size: 24upx;font-family: PingFang SC;font-weight: bold;color: #686868;">
  17. {{item.createTime}}</view>
  18. </view>
  19. <view class="padding-right" v-if="item.withdrawStatus!=2">
  20. <text style="font-size: 36upx;font-family: PingFang SC;font-weight: bold;color: #F3484E;">+{{ item.actualPrice}}</text>
  21. <text class="text-bold padding-left-xs">元</text>
  22. </view>
  23. </view>
  24. </mescroll-body>
  25. <toast ref="toast" ></toast>
  26. </view>
  27. </template>
  28. <script>
  29. import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
  30. export default {
  31. mixins: [MescrollMixin],
  32. data() {
  33. return {
  34. list: [],
  35. downOption:{
  36. auto:false
  37. },
  38. }
  39. },
  40. onLoad() {
  41. },
  42. methods: {
  43. downCallback() {
  44. setTimeout(() => {
  45. this.$refs.toast.info('刷新成功')
  46. this.mescroll.resetUpScroll();
  47. }, 1000)
  48. },
  49. toast(msg){
  50. this.$refs.toast.error(msg)
  51. },
  52. upCallback(mescroll) {
  53. let params = {
  54. ownerId:this.vuex_userId,
  55. current:mescroll.num,
  56. size:mescroll.size,
  57. }
  58. try {
  59. this.$api.withdraw.list(params).then(res => {
  60. let data = res.data.records
  61. let total = res.data.total
  62. mescroll.endBySize(data.length, total);
  63. if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
  64. this.list = this.list.concat(data); //追加新数据
  65. })
  66. } catch (e) {
  67. this.mescroll.endErr()
  68. }
  69. },
  70. }
  71. }
  72. </script>
  73. <style lang="scss">
  74. .title {
  75. font-size: 28upx;
  76. font-family: PingFang SC;
  77. font-weight: 800;
  78. color: #000000;
  79. margin-bottom: 20rpx;
  80. }
  81. </style>