followTopic.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <view class="follow-topic flex-common-css">
  3. <Nav :titleColor="'#000'" :title="'关注的话题'"></Nav>
  4. <scroll-view :scroll-y="true" class="list-scroll" @scroll="scroll" @scrolltolower="scrolltolower">
  5. <view class="topic-list-box" v-for="(item,index) in dataList" :key="index">
  6. <view class="topic-list-left">
  7. <image class="topic-list-left-img sys-radius-12" :src="item.img" mode=""></image>
  8. <view class="topic-list-left-text">
  9. <view class="topic-list-left-name sys-size-32 sys-color-black">
  10. # {{item.name}}
  11. </view>
  12. <view class="topic-list-left-info sys-size-24 sys-color-gray-9">
  13. {{item.num}}条动态
  14. </view>
  15. </view>
  16. </view>
  17. <view class="topic-list-right sys-background-F2F2F2 sys-radius-round" @click="goToTopic(item.id)">
  18. <uni-icons type="right" size="15" color="#999999"></uni-icons>
  19. </view>
  20. </view>
  21. </scroll-view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. components: {},
  27. data() {
  28. return {
  29. dataList: [{
  30. 'img': '/static/img/login/2.jpg',
  31. 'name': '嘿,我在我在我在我在我...',
  32. 'num': '1.5w',
  33. 'time': '04-13 06:03:56',
  34. 'id': '1',
  35. 'likeStyle': '1',
  36. }, {
  37. 'img': '/static/img/temporary/1.png',
  38. 'name': 'wwwwww',
  39. 'text': '今天手机好像撞邪了,拦都拦不住硬要给你打招呼~',
  40. 'imgTwo': '/static/img/temporary/1.png',
  41. 'time': '04-13 06:03:56',
  42. 'likeStyle': '1',
  43. }, {
  44. 'img': '/static/img/temporary/1.png',
  45. 'name': 'wwwwww',
  46. 'text': '今天手机好像撞邪了,拦都拦不住硬要给你打招呼~',
  47. 'imgTwo': '/static/img/temporary/1.png',
  48. 'time': '04-13 06:03:56',
  49. 'likeStyle': '2',
  50. }, {
  51. 'img': '/static/img/temporary/1.png',
  52. 'name': 'wwwwww',
  53. 'text': '今天手机好像撞邪了,拦都拦不住硬要给你打招呼~',
  54. 'imgTwo': '/static/img/temporary/1.png',
  55. 'time': '04-13 06:03:56',
  56. 'likeStyle': '2',
  57. }],
  58. };
  59. },
  60. mounted() {},
  61. methods: {
  62. scroll() {},
  63. scrolltolower() {},
  64. goToTopic(id) {
  65. console.log(id);
  66. uni.navigateTo({
  67. url: '/pages/circle/topic'
  68. });
  69. },
  70. },
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .follow-topic {
  75. .list-scroll {
  76. width: 100%;
  77. flex: 1;
  78. overflow: auto;
  79. padding: 32rpx 40rpx 0 32rpx;
  80. box-sizing: border-box;
  81. display: flex;
  82. flex-direction: column;
  83. .topic-list-box {
  84. width: 100%;
  85. height: auto;
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. margin: 0 0 40rpx 0;
  90. .topic-list-left {
  91. display: flex;
  92. align-items: center;
  93. .topic-list-left-img {
  94. width: 112rpx;
  95. height: 112rpx;
  96. margin: 0 20rpx 0 0;
  97. }
  98. .topic-list-left-text {
  99. .topic-list-left-name {
  100. margin: 0 0 8rpx 0;
  101. white-space: nowrap;
  102. text-overflow: ellipsis;
  103. overflow: hidden;
  104. word-break: break-all;
  105. }
  106. .topic-list-left-info {}
  107. }
  108. }
  109. .topic-list-right {
  110. width: 52rpx;
  111. height: 52rpx;
  112. display: flex;
  113. flex-direction: column;
  114. align-items: center;
  115. line-height: 52rpx;
  116. }
  117. }
  118. }
  119. }
  120. </style>