records.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. </view>
  26. </template>
  27. <script>
  28. import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
  29. export default {
  30. mixins: [MescrollMixin],
  31. data() {
  32. return {
  33. list: [],
  34. downOption:{
  35. auto:false
  36. },
  37. }
  38. },
  39. onLoad() {
  40. },
  41. methods: {
  42. downCallback() {
  43. setTimeout(() => {
  44. uni.showToast({
  45. title: "刷新成功",
  46. icon: "none"
  47. })
  48. this.mescroll.resetUpScroll();
  49. }, 1000)
  50. },
  51. toast(msg){
  52. this.$u.toast(msg)
  53. },
  54. upCallback(mescroll) {
  55. let params = {
  56. ownerId:this.vuex_shopId,
  57. current:mescroll.num,
  58. size:mescroll.size,
  59. }
  60. try {
  61. this.$api.withdraw.list(params).then(res => {
  62. let data = res.data.records
  63. let total = res.data.total
  64. mescroll.endBySize(data.length, total);
  65. if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
  66. this.list = this.list.concat(data); //追加新数据
  67. })
  68. } catch (e) {
  69. this.mescroll.endErr()
  70. }
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="scss">
  76. .title {
  77. font-size: 28upx;
  78. font-family: PingFang SC;
  79. font-weight: 800;
  80. color: #000000;
  81. margin-bottom: 20rpx;
  82. }
  83. </style>