storeCommission.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="content">
  3. <view class="cms-top">
  4. <image src="../../static/img/wallertbg.png" mode="" class="top-bg"></image>
  5. <view class="top-num">
  6. <view style="font-size: 52rpx;padding-bottom: 10rpx;">{{all}}</view>
  7. <view class="">
  8. 可提佣金
  9. </view>
  10. </view>
  11. </view>
  12. <scroll-view scroll-y="true" class="scroll-wrap" :style="{'height': height}">
  13. <view v-for="(item, index) in list" :key="index" class="order-item flex">
  14. <view class="title-box">
  15. <view class="title">
  16. <text>{{ item.mark }}</text>
  17. </view>
  18. <view class="time">
  19. <text>{{ item.add_time }}</text>
  20. </view>
  21. </view>
  22. <view class="money">
  23. <text>{{(item.pm == 0 ? '-' : '+') + item.number }}</text>
  24. </view>
  25. <view class="jg"></view>
  26. </view>
  27. <uni-load-more :status="loadingType"></uni-load-more>
  28. </scroll-view>
  29. <view class="tx-btn" @click="navTo('/user/page/withdrawal')" v-if="all*1 > 0">
  30. 立即提现
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. import {
  36. getStoreCms
  37. } from '@/api/user.js'
  38. export default {
  39. data() {
  40. return {
  41. page: 1,
  42. limit: 10,
  43. loadingType: 'more',
  44. loaded: false,
  45. list: [],
  46. all: '',
  47. height: ''
  48. }
  49. },
  50. onLoad() {
  51. },
  52. onShow() {
  53. this.page = 1
  54. this.loadingType = 'more'
  55. this.loaded = false
  56. this.list = []
  57. this.all = ''
  58. this.getStoreCms()
  59. },
  60. onReady(res) {
  61. var obj = this;
  62. uni.getSystemInfo({
  63. success: resu => {
  64. const query = uni.createSelectorQuery();
  65. query.select('.scroll-wrap').boundingClientRect();
  66. query.exec(function(res) {
  67. console.log(res, 'ddddddddddddd');
  68. obj.height = resu.windowHeight - res[0].top + 'px';
  69. console.log('打印页面的剩余高度', obj.height);
  70. });
  71. },
  72. fail: res => {}
  73. });
  74. },
  75. methods: {
  76. navTo(url) {
  77. uni.navigateTo({
  78. url
  79. })
  80. },
  81. getStoreCms() {
  82. let obj = this
  83. if(obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
  84. return
  85. }
  86. obj.loadingType = 'loading'
  87. getStoreCms().then(({
  88. data
  89. }) => {
  90. obj.all = data.all
  91. obj.list = obj.list.concat(data.data.data)
  92. obj.page++
  93. if(data.data.data.length == obj.limit) {
  94. obj.loadingType = 'more'
  95. }else {
  96. obj.loadingType = 'noMore'
  97. }
  98. })
  99. }
  100. }
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .cms-top {
  105. width: 750rpx;
  106. height: 400rpx;
  107. position: relative;
  108. .top-bg {
  109. width: 750rpx;
  110. height: 400rpx;
  111. position: absolute;
  112. }
  113. .top-num {
  114. padding-top: 120rpx;
  115. width: 750rpx;
  116. color: #fff;
  117. font-size: 32rpx;
  118. font-family: PingFang SC;
  119. font-weight: bold;
  120. color: #FFFFFF;
  121. text-align: center;
  122. position: relative;
  123. text {
  124. font-size: 47rpx;
  125. }
  126. }
  127. }
  128. .order-item {
  129. padding: 20rpx 30rpx;
  130. line-height: 1.5;
  131. position: relative;
  132. // border-bottom: 1rpx black solid;
  133. .title-box {
  134. .title {
  135. font-size: $font-lg;
  136. color: $font-color-base;
  137. }
  138. .time {
  139. font-size: $font-base;
  140. color: $font-color-light;
  141. }
  142. }
  143. .money {
  144. // color: #fd5b23;
  145. color: #901B21;
  146. font-size: $font-lg;
  147. }
  148. .jg {
  149. width: 701rpx;
  150. height: 2rpx;
  151. background: #F0F4F8;
  152. margin: 0 auto;
  153. position: absolute;
  154. bottom: 0;
  155. }
  156. }
  157. .tx-btn {
  158. position: absolute;
  159. bottom: 50rpx;
  160. left: 0;
  161. right: 0;
  162. margin: auto;
  163. width: 674rpx;
  164. height: 88rpx;
  165. background: #901b21;
  166. border-radius: 44rpx;
  167. font-size: 36rpx;
  168. font-family: PingFang SC;
  169. font-weight: 500;
  170. color: #FFFFFF;
  171. text-align: center;
  172. line-height: 88rpx;
  173. z-index: 99;
  174. }
  175. .scroll-wrap {
  176. padding-bottom: 168rpx;
  177. }
  178. </style>