integralDet.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <view>
  3. <view style="text-align: left;padding-bottom: 10rpx;">
  4. <view v-for="(item, index) in list" :key="index" class="item">
  5. <view>
  6. <!-- <view style="margin-bottom: 8upx;text-align: right;">
  7. <text v-if="item.type == 1" style="margin-bottom: 8upx;color: #ecd4b4">充值</text>
  8. <text v-if="item.type == 2" style="margin-bottom: 8upx;color: #ecd4b4">提现</text>
  9. </view> -->
  10. <view style="color: #999999;font-size: 28upx;">
  11. <view style="margin-bottom: 8upx">{{item.title}}</view>
  12. <!-- <view v-if="item.classify === 2" style="margin-bottom: 8upx"> 返佣类型:直属返佣</view> -->
  13. <!-- <view v-if="item.classify === 3" style="margin-bottom: 8upx"> 返佣类型:非直属支付</view> -->
  14. <view style="margin-bottom: 8upx">{{item.content}}</view>
  15. <view style="margin-bottom: 8upx"> 创建时间:{{item.createTime}}</view>
  16. <view style="margin-bottom: 8upx;text-align: right;">
  17. <text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">+</text>{{item.num}}积分</text>
  18. <text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">-</text>{{item.num}}积分</text>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 加载更多提示 -->
  24. <!-- <view class="s-col is-col-24" v-if="list.length > 0">
  25. <load-more :loadingType="loadingType" :contentText="contentText"></load-more>
  26. </view> -->
  27. <!-- 加载更多提示 -->
  28. <!-- <empty v-if="list.length === 0" des="暂无明细数据" show="false"></empty> -->
  29. <empty v-if="list.length == 0" content="暂无数据" ></empty>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import empty from '@/components/empty.vue'
  35. export default {
  36. components: {
  37. empty
  38. },
  39. data() {
  40. return {
  41. list: [],
  42. page: 1,
  43. limit: 10,
  44. tabIndex: 1,
  45. checkReZhiShu: '否',
  46. checkReTuanZhang: '否',
  47. checkReFeiZhiShu: '否',
  48. scrollTop: false,
  49. contentText: {
  50. contentdown: '上拉显示更多',
  51. contentrefresh: '正在加载...',
  52. contentnomore: '没有更多数据了'
  53. },
  54. classify: '',
  55. totalCount: 0
  56. }
  57. },
  58. onLoad(option) {
  59. this.classify = option.classify
  60. if(this.classify == 2) {
  61. uni.setNavigationBarTitle({
  62. title: "兑换记录"
  63. });
  64. }
  65. this.$queue.showLoading("加载中...");
  66. this.getList();
  67. },
  68. onPageScroll: function(e) {
  69. this.scrollTop = e.scrollTop > 200;
  70. },
  71. methods: {
  72. getList() {
  73. let data = {
  74. page: this.page,
  75. limit: this.limit,
  76. classify: this.classify==2?this.classify:''
  77. }
  78. this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList',data ).then(res => {
  79. if (res.code === 0) {
  80. this.totalCount = res.data.totalCount
  81. if (this.page === 1) {
  82. this.list = res.data.list;
  83. } else {
  84. this.list = [...this.list, ...res.data.list];
  85. }
  86. }
  87. uni.stopPullDownRefresh();
  88. uni.hideLoading();
  89. });
  90. }
  91. },
  92. onReachBottom: function() {
  93. // this.page = this.page + 1;
  94. // this.getList();
  95. if(this.list.length<this.totalCount) {
  96. this.page = this.page + 1;
  97. this.getList()
  98. } else {
  99. uni.showToast({
  100. title: '已经到底了',
  101. icon: 'none'
  102. })
  103. }
  104. },
  105. onPullDownRefresh: function() {
  106. this.page = 1;
  107. this.getList();
  108. }
  109. }
  110. </script>
  111. <style lang="less">
  112. page {
  113. // background: #1c1b20;
  114. }
  115. .tui-tab-item-title {
  116. // color: #ffffff;
  117. font-size: 30rpx;
  118. height: 80rpx;
  119. line-height: 80rpx;
  120. flex-wrap: nowrap;
  121. white-space: nowrap;
  122. }
  123. .tui-tab-item-title-active {
  124. border-bottom: 1px solid #5E81F9;
  125. color: #5E81F9;
  126. font-size: 32upx;
  127. font-weight: bold;
  128. border-bottom-width: 6upx;
  129. text-align: center;
  130. }
  131. .item {
  132. background: #FFFFFF;
  133. padding: 32rpx;
  134. margin: 32rpx;
  135. font-size: 28rpx;
  136. box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
  137. border-radius: 16upx;
  138. }
  139. </style>