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.

134 lines
2.6 KiB

8 months ago
  1. <template>
  2. <view class="invitation-list bx">
  3. <navbar :leftClick="leftClick" :title="$t('page.invitationList.title')"></navbar>
  4. <!-- 粉丝列表 -->
  5. <u-list v-if="fanList.length > 0" @scrolltolower="scrolltolower" height="calc(100vh - 90rpx)">
  6. <view class="fan-list">
  7. <view v-for="item in fanList" class="fan-item">
  8. <view class="fan-item-left">
  9. <image src="@/static/center/5.png" mode="aspectFit"></image>
  10. <view class="username">{{ item.account}}</view>
  11. </view>
  12. <view class="fan-item-right">{{ item.createTime }}</view>
  13. </view>
  14. </view>
  15. </u-list>
  16. <!-- 无粉丝 -->
  17. <view v-else class="noFans">{{ $t('page.invitationList.noFans') }}</view>
  18. </view>
  19. </template>
  20. <script>
  21. import navbar from '@/components/base/m-navbar.vue'
  22. export default {
  23. components: {
  24. navbar
  25. },
  26. data() {
  27. return {
  28. queryparams : {
  29. pageNo : 1,
  30. pageSize : 10
  31. },
  32. fanList : []
  33. }
  34. },
  35. onShow() {
  36. this.getFanList()
  37. },
  38. methods: {
  39. leftClick() {
  40. uni.navigateTo({
  41. url: '/pages/home/home'
  42. })
  43. },
  44. //获取粉丝列表
  45. getFanList(){
  46. this.request('fansPage', {}, this.queryparams).then(res => {
  47. if (res.code == 200) {
  48. this.fanList = res.result.records
  49. }
  50. })
  51. },
  52. //滑动到页面底部
  53. scrolltolower(){
  54. this.queryparams.pageSize += 10
  55. this.getFanList()
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .invitation-list {
  62. width: 750rpx;
  63. min-height: 100vh;
  64. background-color: black;
  65. margin: 0 auto;
  66. background-size: 100%;
  67. background-repeat: no-repeat;
  68. color: white;
  69. .noFans{
  70. height: 100vh;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. color: #ffffff80;
  75. }
  76. .fan-list{
  77. width: 96%;
  78. margin: 0rpx auto;
  79. padding-top: 20rpx;
  80. border: 1px solid #ffffff80;
  81. margin-top: 20rpx;
  82. .fan-item{
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. border-bottom: 1px solid #ffffff80;
  87. padding: 20rpx;
  88. box-sizing: border-box;
  89. &:last-child{
  90. border: none;
  91. }
  92. .fan-item-left{
  93. width: 200rpx;
  94. display: flex;
  95. align-items: center;
  96. overflow: hidden;
  97. image{
  98. width: 100rpx;
  99. height: 100rpx;
  100. border-radius: 50%;
  101. }
  102. .username{
  103. width: calc(100% - 120rpx);
  104. margin-left: 20rpx;
  105. white-space: normal;
  106. text-overflow: ellipsis;
  107. overflow: hidden;
  108. }
  109. }
  110. .fan-item-right{
  111. width: calc(100% - 200rpx);
  112. text-align: right;
  113. font-size: 20rpx;
  114. color: #ccc;
  115. }
  116. }
  117. }
  118. }
  119. </style>