index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <page title="详情" light nav-color="transparent">
  3. <view v-if="data" class="top flex-align">
  4. <image :src="data.avatar" class="tx" />
  5. <view class="paddingL20">
  6. <view class="font6 bold color-white">{{ data.nickname }}</view>
  7. <view class="color-white paddingT12">
  8. 共拉新{{ data.quantity }}人/TOP{{ data.index }}
  9. </view>
  10. </view>
  11. </view>
  12. <view class="body">
  13. <view class="paddingT20 paddingB14 flex-align-center">
  14. <image
  15. :src="require('@/static/image/popularize_flag.png')"
  16. style="width: 294rpx; height: 52rpx"
  17. />
  18. </view>
  19. <scroll-view
  20. class="wrapper"
  21. :style="{
  22. height: `calc(100vh - ${statusBarHeight} - 32px - 216rpx - 120rpx - 60rpx)`
  23. }"
  24. scroll-y
  25. refresher-enabled
  26. refresher-default-style="white"
  27. @scrolltolower="loadMore"
  28. >
  29. <view class="flex-wrap flex-align-between">
  30. <view v-for="item in tableData" :key="item.userId" class="item flex-align">
  31. <image :src="item.avatar" class="tx" />
  32. <view class="paddingL12 color-white font2">{{ item.nickname }}</view>
  33. </view>
  34. </view>
  35. </scroll-view>
  36. </view>
  37. </page>
  38. </template>
  39. <script>
  40. import store from '@/store'
  41. import pageMixin from '@/mixin/page'
  42. export default {
  43. mixins: [pageMixin],
  44. data() {
  45. return {
  46. data: null,
  47. pageSize: 100
  48. }
  49. },
  50. computed: {
  51. statusBarHeight() {
  52. if (store.state.systemInfo) {
  53. return store.state.systemInfo.statusBarHeight + 'px'
  54. }
  55. return 20 + 'px'
  56. }
  57. },
  58. onLoad(options) {
  59. this.data = options
  60. },
  61. mounted() {
  62. this.refresh()
  63. },
  64. methods: {
  65. async loadData(loading = false) {
  66. const res = await this.$service.weal.popularizePeoples(
  67. this.pageNum,
  68. this.pageSize,
  69. this.data.userId,
  70. loading
  71. )
  72. return res
  73. }
  74. }
  75. }
  76. </script>
  77. <style>
  78. </style>
  79. <style lang="scss" scoped>
  80. .bg {
  81. position: fixed;
  82. z-index: -1;
  83. left: 0;
  84. right: 0;
  85. top: 0;
  86. width: 100%;
  87. height: 100%;
  88. }
  89. .top {
  90. margin: 20rpx 34rpx;
  91. height: 176rpx;
  92. background: rgba(0, 0, 0, 0.5);
  93. box-shadow: 0px 0px 8rpx 4rpx rgba(147, 67, 255, 0.3);
  94. border: 2rpx solid rgba(174, 231, 255, 0.5);
  95. border-radius: 12rpx;
  96. padding: 0 50rpx;
  97. .tx {
  98. width: 120rpx;
  99. height: 120rpx;
  100. border-radius: 60rpx;
  101. border: 1px solid #00a2e7;
  102. }
  103. }
  104. .body {
  105. margin: 0 34rpx;
  106. background: rgba(0, 0, 0, 0.5);
  107. box-shadow: 0px 0px 4px 2px rgba(147, 67, 255, 0.3);
  108. border: 1px solid rgba(174, 231, 255, 0.5);
  109. border-radius: 12rpx;
  110. .item {
  111. width: 33%;
  112. padding: 14rpx 0 14rpx 50rpx;
  113. .tx {
  114. width: 52rpx;
  115. height: 52rpx;
  116. border-radius: 26rpx;
  117. border: 1px solid #fff;
  118. }
  119. }
  120. }
  121. </style>