myfans.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="content">
  3. <view class="top-fan"></view>
  4. <view class="fans-base flex">
  5. <view class="base-item">
  6. <view class="base-item-val">
  7. 0
  8. </view>
  9. <view class="base-item-name">
  10. 我的粉丝
  11. </view>
  12. </view>
  13. <view class="jg"></view>
  14. <view class="base-item">
  15. <view class="base-item-val">
  16. 0
  17. </view>
  18. <view class="base-item-name">
  19. 活跃粉丝
  20. </view>
  21. </view>
  22. <view class="jg"></view>
  23. <view class="base-item">
  24. <view class="base-item-val">
  25. 0
  26. </view>
  27. <view class="base-item-name">
  28. 总成交额
  29. </view>
  30. </view>
  31. </view>
  32. <view class="fans-tit">
  33. 我的粉丝列表
  34. </view>
  35. <view class="fans-list-tit flex">
  36. <view class="list-item">
  37. ID
  38. </view>
  39. <view class="list-item">
  40. 粉丝
  41. </view>
  42. <view class="list-item">
  43. 当日业绩
  44. </view>
  45. <view class="list-item">
  46. 粉丝数
  47. </view>
  48. </view>
  49. <scroll-view scroll-y="true" class="swiper-box" :style="{'height':height}">
  50. <view class="fans-list-val flex" v-for="(item,index) in list" :style="{'background':index%2 ==0 ? '#F9F9F9':'#fff'}">
  51. <view class="list-item">
  52. 李丹丹
  53. </view>
  54. <view class="list-item">
  55. 粉丝
  56. </view>
  57. <view class="list-item">
  58. 200
  59. </view>
  60. <view class="list-item">
  61. 300
  62. </view>
  63. </view>
  64. </scroll-view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. height: '',
  72. list: [1,2,3,4,5,6,7,8,9,10]
  73. }
  74. },
  75. onReady(res) {
  76. var _this = this;
  77. uni.getSystemInfo({
  78. success: resu => {
  79. const query = uni.createSelectorQuery();
  80. query.select('.swiper-box').boundingClientRect();
  81. query.exec(function(res) {
  82. console.log(res, 'ddddddddddddd');
  83. _this.height = resu.windowHeight - res[0].top + 'px';
  84. console.log('打印页面的剩余高度', _this.height);
  85. });
  86. },
  87. fail: res => {}
  88. });
  89. },
  90. methods: {
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. page {
  96. background-color: #f3f5f4;
  97. height: 100%;
  98. }
  99. .content {
  100. background-color: #f3f5f4;
  101. }
  102. .top-fan {
  103. width: 750rpx;
  104. height: 336rpx;
  105. background: linear-gradient(-41deg, rgba(60, 237, 237, 0.99), #04B8FF, #375AFE);
  106. border-radius: 0 0 40rpx 40rpx;
  107. }
  108. .fans-base {
  109. width: 702rpx;
  110. height: 210rpx;
  111. background: #FFFFFF;
  112. box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
  113. border-radius: 20rpx;
  114. margin: -147rpx auto 0;
  115. text-align: center;
  116. font-size: 30rpx;
  117. font-family: PingFang SC;
  118. font-weight: 500;
  119. color: #666666;
  120. .jg {
  121. width: 2rpx;
  122. height: 96rpx;
  123. background: #DCDCDC;
  124. }
  125. .base-item {
  126. flex-grow: 1;
  127. .base-item-val {
  128. font-size: 50rpx;
  129. font-family: PingFang SC;
  130. font-weight: bold;
  131. color: #0C1732;
  132. }
  133. }
  134. }
  135. .fans-tit {
  136. font-size: 32rpx;
  137. font-family: PingFang SC;
  138. font-weight: bold;
  139. color: #0C1732;
  140. padding: 45rpx 0 29rpx 40rpx;
  141. }
  142. .fans-list-tit {
  143. width: 710rpx;
  144. height: 100rpx;
  145. background: #E2EEFF;
  146. border-radius: 20rpx 20rpx 0px 0px;
  147. margin: auto;
  148. text-align: center;;
  149. font-size: 30rpx;
  150. font-family: PingFang SC;
  151. font-weight: bold;
  152. color: #375AFE;
  153. .list-item {
  154. width: 25%;
  155. flex-shrink: 0;
  156. }
  157. }
  158. .fans-list-val {
  159. width: 710rpx;
  160. height: 100rpx;
  161. margin: auto;
  162. text-align: center;;
  163. font-size: 30rpx;
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. color: #0C1732;
  167. .list-item {
  168. // flex-grow: 1;
  169. width: 25%;
  170. flex-shrink: 0;
  171. }
  172. }
  173. </style>