时空网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
4.5 KiB

  1. <template>
  2. <view>
  3. <!-- 钱包余额信息 -->
  4. <view class="wallet-top">
  5. <view class="bg-white wallet-wraptop flex-direction flex justify-around align-center text-center">
  6. <view class="text-black1 text-price1" style="font-size: 72rpx;">2000.48</view>
  7. <view class="text-gray lf-font-24 lf-m-b-20">佣金</view>
  8. <view>
  9. <button class="btn" @click="$url('/pages/center/widthdraw')">提取佣金</button>
  10. </view>
  11. </view>
  12. </view>
  13. <!-- tabs -->
  14. <view class="bg-white lf-p-t-40 lf-p-b-40 flex justify-around align-center text-center solid-bottom">
  15. <view class="tab-item" :class="current==index?'text-orange':'text-black1'"
  16. v-for="(item, index) in tab_list" :key="index"
  17. @click="current = index">{{ item.name }}
  18. </view>
  19. </view>
  20. <!-- scroll page -->
  21. <block v-if="current == 0">
  22. <scroll-view :style="{height: 'calc('+ windowHeight +'px - 524rpx)'}"
  23. :scroll-y="true" :refresher-enabled="true"
  24. :refresher-triggered="isRefresher"
  25. @scrolltolower="onScrolltolower"
  26. @refresherrefresh="onRefresherrefresh">
  27. <view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom" v-for="item in 12" :key="item">
  28. <view class="flex align-center text-center justify-between">
  29. <view class="lf-font-36 lf-color-price">-¥10.00</view>
  30. <view class="lf-font-32 text-black1">结余 ¥34.43</view>
  31. </view>
  32. <view class="flex align-center text-center justify-between lf-m-t-10">
  33. <view class="lf-font-24 lf-color-999">内部粉丝购买商品获得</view>
  34. <view class="lf-font-24 lf-color-999">2021-7-6 22:32:43</view>
  35. </view>
  36. </view>
  37. <!-- 空数据的情况 -->
  38. <view class="loading-more">
  39. <text v-if="tab_list[0].list.length" :class="{'loading-more-text': tab_list[0].loadingClass}">{{ tab_list[0].loadingText }}</text>
  40. <my-nocontent v-else></my-nocontent>
  41. </view>
  42. </scroll-view>
  43. </block>
  44. <block v-else>
  45. <scroll-view :style="{height: 'calc('+ windowHeight +'px - 524rpx)'}"
  46. :scroll-y="true" :refresher-enabled="true"
  47. :refresher-triggered="isRefresher"
  48. @scrolltolower="onScrolltolower"
  49. @refresherrefresh="onRefresherrefresh">
  50. <view class="flex flex-direction justify-between lf-p-t-20 lf-p-b-20 lf-p-l-32 lf-p-r-32 solid-bottom">
  51. <view class="flex align-center text-center justify-between">
  52. <view class="lf-font-36 lf-color-price">-¥11.00</view>
  53. <view class="lf-font-28 text-orange">申请中</view>
  54. </view>
  55. <view class="flex align-center text-center justify-between lf-m-t-10">
  56. <view class="lf-font-24 lf-color-999">流水号 638763485895875</view>
  57. <view class="lf-font-24 lf-color-999">2021-7-6 22:32:43</view>
  58. </view>
  59. </view>
  60. <!-- 空数据的情况 -->
  61. <view class="loading-more">
  62. <text v-if="tab_list[1].list.length" :class="{'loading-more-text': tab_list[1].loadingClass}">{{ tab_list[1].loadingText }}</text>
  63. <my-nocontent v-else></my-nocontent>
  64. </view>
  65. </scroll-view>
  66. </block>
  67. </view>
  68. </template>
  69. <script>
  70. export default {
  71. data() {
  72. return {
  73. current: 0,
  74. pageSize: 10,
  75. isRefresher: false, // scroll-view下拉刷新状态,当前默认没有触发
  76. tab_list: [{
  77. name: '佣金记录',
  78. list: [1,2,3,4,5,6,7,8,9],
  79. page: 1,
  80. isPage: false,
  81. loadingClass: false,
  82. loadingText: '已加载全部数据'
  83. },{
  84. name: '提取记录',
  85. list: [1],
  86. page: 1,
  87. isPage: false,
  88. loadingClass: true,
  89. loadingText: '正在加载中'
  90. }],
  91. windowHeight: 0
  92. }
  93. },
  94. onLoad(){
  95. this.windowHeight = uni.getSystemInfoSync().windowHeight;
  96. },
  97. methods: {
  98. // 页面触底,加载下一页
  99. onScrolltolower(){
  100. console.log('加载下一页')
  101. },
  102. // scroll-view 下拉刷新
  103. onRefresherrefresh(){
  104. this.isRefresher = true;
  105. console.log('下拉刷新')
  106. setTimeout(() => {
  107. this.isRefresher = false;
  108. },1000)
  109. }
  110. }
  111. }
  112. </script>
  113. <style scoped lang="scss">
  114. .tab-item{
  115. font-size: 32rpx;
  116. width: 50%;
  117. box-sizing: border-box;
  118. &:first-child{
  119. border-right: 2rpx solid rgba(0, 0, 0, 0.1);
  120. }
  121. }
  122. .com {
  123. height: 900rpx;
  124. }
  125. .wallet-top {
  126. height: 404rpx;
  127. width: 100%;
  128. padding: 28rpx 32rpx;
  129. background-color: #FE9903;
  130. }
  131. .wallet-wraptop {
  132. width: 100%;
  133. height: 100%;
  134. border-radius: 10rpx;
  135. padding: 46rpx 0 44rpx 0;
  136. }
  137. .btn{
  138. margin: 0;
  139. padding: 0;
  140. width: 320rpx;
  141. height: 84rpx;
  142. background-color: #FE9903;
  143. color: #FFFFFF;
  144. line-height: 84rpx;
  145. font-size: 32rpx;
  146. border-radius: 42rpx;
  147. }
  148. </style>