extractRecord.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <view class="checkInRecord">
  3. <scroll-view scroll-y="true" class="checkInList" lower-threshold="80" @scrolltolower="scrolltolower">
  4. <view style="margin: 0 20rpx 20rpx" v-if="adConfig.videoAd">
  5. <ad-view :unitId="adConfig.videoAd" adIntervals="200" adType="video"></ad-view>
  6. </view>
  7. <view v-for="item in signList" :key="item.id" class="item">
  8. <view class="left">
  9. <view class="title">提取{{item.value}}书币</view>
  10. <view class="data">{{item.createTime}}</view>
  11. </view>
  12. </view>
  13. <view style="margin: 80rpx 0;" v-if="signList.length === 0">
  14. <u-empty text="提取记录空" mode="list"></u-empty>
  15. </view>
  16. <view class="baseline" v-if="signList.length > 0 && this.total === this.signList.length">
  17. —— 我是有底线的 ——
  18. </view>
  19. </scroll-view>
  20. </view>
  21. </template>
  22. /**
  23. * 提现记录
  24. *
  25. **/
  26. <script>
  27. import { getCoinRemoveList, config } from '@/api/api.js'
  28. import { videoAd } from '@/utils/ad_config.js'
  29. import adView from '@/components/ad-view/ad-view.vue'
  30. export default {
  31. components: {
  32. adView
  33. },
  34. data() {
  35. return {
  36. adConfig: {
  37. videoAd
  38. },
  39. queryForm: {
  40. page: 1,
  41. pageSize: 20,
  42. appId: config.appid
  43. },
  44. isShowYeer: false, //是否展示年月
  45. signList: [],
  46. total: 0
  47. };
  48. },
  49. onLoad(options) {
  50. if (Object.keys(options).length > 0) {
  51. this.queryForm = {...this.queryForm, ...options}
  52. this.getList()
  53. }
  54. },
  55. methods: {
  56. getList() {
  57. getCoinRemoveList({ ...this.queryForm }).then(res => {
  58. this.signList = this.signList.concat(res.data.records)
  59. this.total = res.data.total
  60. })
  61. },
  62. // 滚动到底部去获取数据
  63. scrolltolower() {
  64. if ( this.signList.length !== this.total ) {
  65. this.$set(this.queryForm, 'page', this.queryForm.page + 1)
  66. this.getList()
  67. }
  68. }
  69. }
  70. }
  71. </script>
  72. <style lang="scss">
  73. page {
  74. background-color: #f3f3f3;
  75. }
  76. .checkInRecord {
  77. width: 100%;
  78. height: 100vh;
  79. }
  80. .checkInList{
  81. height: 100vh;
  82. padding-bottom: 40rpx;
  83. box-sizing: border-box;
  84. overflow: hidden;
  85. .item {
  86. padding: 10rpx 0;
  87. margin: 0 30rpx;
  88. border-bottom: 1rpx solid #efefef;
  89. display: flex;
  90. justify-content: space-between;
  91. align-items: center;
  92. }
  93. .title {
  94. font-size: 28rpx;
  95. font-weight: 500;
  96. color: #000000;
  97. }
  98. .data {
  99. font-size: 24rpx;
  100. margin-top: 8rpx;
  101. color: #808080;
  102. }
  103. .center {
  104. font-size: 24rpx;
  105. color: #808080;
  106. }
  107. .right {
  108. text-align: center;
  109. &>text {
  110. font-size: 28rpx;
  111. }
  112. .error {
  113. font-size: 24rpx;
  114. color: #FC6E53;
  115. }
  116. }
  117. }
  118. .baseline {
  119. text-align: center;
  120. padding: 30rpx 0;
  121. font-size: 24rpx;
  122. color: #999999;
  123. }
  124. </style>