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.

133 lines
2.6 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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: $uni-text-color;
  69. .noFans{
  70. height: 100vh;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. }
  75. .fan-list{
  76. width: 96%;
  77. margin: 0rpx auto;
  78. padding-top: 20rpx;
  79. border: 1px solid #00000080;
  80. margin-top: 20rpx;
  81. .fan-item{
  82. display: flex;
  83. justify-content: space-between;
  84. align-items: center;
  85. border-bottom: 1px solid #00000080;
  86. padding: 20rpx;
  87. box-sizing: border-box;
  88. &:last-child{
  89. border: none;
  90. }
  91. .fan-item-left{
  92. width: 200rpx;
  93. display: flex;
  94. align-items: center;
  95. overflow: hidden;
  96. image{
  97. width: 100rpx;
  98. height: 100rpx;
  99. border-radius: 50%;
  100. }
  101. .username{
  102. width: calc(100% - 120rpx);
  103. margin-left: 20rpx;
  104. white-space: normal;
  105. text-overflow: ellipsis;
  106. overflow: hidden;
  107. }
  108. }
  109. .fan-item-right{
  110. width: calc(100% - 200rpx);
  111. text-align: right;
  112. font-size: 20rpx;
  113. color: #ccc;
  114. }
  115. }
  116. }
  117. }
  118. </style>