topicPlaza.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <template>
  2. <view class="topic-plaza flex-common-css">
  3. <Nav class="nav-class" :title="'话题广场'" :bgckgroundBox="!isScroll?'#141414':'#fff'"
  4. :titleColor="isScroll?'#000':'#fff'">
  5. </Nav>
  6. <scroll-view :scroll-y="true" class="list-scroll" @scroll="scroll" @scrolltolower="scrolltolower">
  7. <view class="sys-background-black">
  8. <view class="follow-box sys-size-32 sys-weight-500 sys-color-5B">
  9. 大家都在聊
  10. </view>
  11. <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="info" :current="current"
  12. mode="round" :dots-styles="dotsStyles">
  13. <swiper class="swiper-box" @change="change" :current="swiperDotIndex">
  14. <swiper-item v-for="(item, index) in info" :key="index">
  15. <view @click="goPlaza(itemTwo.id)" v-for="(itemTwo,indexTwo) in item.data" :key="indexTwo"
  16. class="swiper-item">
  17. <image class="swiper-img sys-radius-8" :src="itemTwo.url" mode=""></image>
  18. <view class="swiper-right">
  19. <view class="swiper-right-name">
  20. <view class="sys-size-28 sys-color-white">
  21. # {{itemTwo.name}}
  22. </view>
  23. <view class="tp sys-color-4BC285 sys-size-28">
  24. 投票
  25. </view>
  26. </view>
  27. <view class="sys-size-24 sys-color-5B">
  28. {{itemTwo.num}}w人参与了投票
  29. </view>
  30. </view>
  31. </view>
  32. </swiper-item>
  33. </swiper>
  34. </uni-swiper-dot>
  35. </view>
  36. <view class="list-box flex-index-css">
  37. <view class="list">
  38. <view class="list-title sys-size-32 sys-weight-600 sys-color-black">
  39. # 嘿,我在
  40. </view>
  41. <view class="list-num sys-color-gray-9 sys-size-28">
  42. {{839}}条动态
  43. </view>
  44. <view class="list-data">
  45. <view class="list-left">
  46. <view class="list-left-text">
  47. 来了不想走
  48. </view>
  49. <view class="list-left-time">
  50. <view class="list-left-time-text sys-color-gray-9 sys-size-24">
  51. 你会唱晴天吗?
  52. </view>
  53. <view class="list-time sys-color-gray-9 sys-size-24">
  54. 13分钟前发布
  55. </view>
  56. </view>
  57. </view>
  58. <image class="list-right sys-radius-12" src="/static/img/login/2.jpg" mode=""></image>
  59. </view>
  60. </view>
  61. </view>
  62. </scroll-view>
  63. </view>
  64. </template>
  65. <script>
  66. export default {
  67. components: {},
  68. data() {
  69. return {
  70. isScroll: false,
  71. info: [{
  72. data: [{
  73. name: '能接受姐弟恋吗?',
  74. url: '/static/img/login/2.jpg',
  75. num: '1.6w',
  76. id: 1,
  77. }, {
  78. name: '分手后还能不能做朋友投票?',
  79. url: '/static/img/temporary/1.png',
  80. num: '1.6w'
  81. }, {
  82. name: '相亲要不要AA制投票?',
  83. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  84. num: '1.6w'
  85. }]
  86. },
  87. {
  88. data: [{
  89. name: '分手后还能不能做朋友投票',
  90. url: '/static/img/login/2.jpg',
  91. num: '1.6w'
  92. }, {
  93. name: '分手后还能不能做朋友投票?',
  94. url: '/static/img/login/2.jpg',
  95. num: '1.6w'
  96. }, {
  97. name: '分手后还能不能做朋友投票?',
  98. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  99. num: '1.6w'
  100. }]
  101. },
  102. {
  103. data: [{
  104. name: '相亲要不要AA制投票?',
  105. url: '/static/img/login/2.jpg',
  106. num: '1.6w'
  107. }, {
  108. name: '相亲要不要AA制投票?',
  109. url: '/static/img/temporary/1.png',
  110. num: '1.6w'
  111. }, {
  112. name: '相亲要不要AA制投票?',
  113. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  114. num: '1.6w'
  115. }]
  116. }
  117. ],
  118. listData: [{
  119. name: '相亲要不要AA制投票?',
  120. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  121. num: '1.6w'
  122. }, {
  123. name: '相亲要不要AA制投票?',
  124. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  125. num: '1.6w'
  126. }, {
  127. name: '相亲要不要AA制投票?',
  128. url: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg',
  129. num: '1.6w'
  130. }],
  131. current: 0,
  132. dotsStyles: {
  133. backgroundColor: 'rgba(255,255,255,0.4)',
  134. border: 'rgba(255,255,255,0.4)',
  135. color: '#fff',
  136. selectedBackgroundColor: '#fff',
  137. selectedBorder: '#fff',
  138. },
  139. swiperDotIndex: 0,
  140. };
  141. },
  142. mounted() {},
  143. methods: {
  144. scroll(e) {
  145. if (e.detail.scrollTop > 50) {
  146. this.isScroll = true
  147. } else {
  148. this.isScroll = false
  149. }
  150. },
  151. scrolltolower() {
  152. console.log('触底');
  153. },
  154. change(e) {
  155. this.current = e.detail.current
  156. },
  157. clickItem(e) {
  158. this.swiperDotIndex = e
  159. },
  160. goPlaza(id) {}
  161. },
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. ::v-deep .uni-swiper__dots-box[data-v-77b53eff] {
  166. position: fixed;
  167. bottom: 10px;
  168. left: 77%;
  169. top: -77%;
  170. right: 0;
  171. display: flex;
  172. flex: 1;
  173. flex-direction: row;
  174. justify-content: center;
  175. align-items: center;
  176. z-index: 9999;
  177. }
  178. .topic-plaza {
  179. .list-scroll {
  180. width: 100%;
  181. flex: 1;
  182. overflow: auto;
  183. .follow-box {
  184. padding: 40rpx 0 0 32rpx;
  185. width: 100%;
  186. height: auto;
  187. }
  188. .swiper-box {
  189. width: 100%;
  190. height: 436rpx;
  191. padding: 42rpx 32rpx 0;
  192. box-sizing: border-box;
  193. .swiper-item {
  194. display: flex;
  195. align-items: center;
  196. margin: 0 0 42rpx 0;
  197. .swiper-img {
  198. width: 88rpx;
  199. height: 88rpx;
  200. margin: 0 20rpx 0 0;
  201. }
  202. .swiper-right {
  203. .swiper-right-name {
  204. display: flex;
  205. align-items: center;
  206. margin: 0 0 4rpx 0;
  207. }
  208. .tp {
  209. margin: 0 0 0 8rpx;
  210. font-family: PangMenZhengDao-3-Regular, PangMenZhengDao-3;
  211. }
  212. }
  213. }
  214. }
  215. .list-box {
  216. padding: 40rpx 32rpx 0;
  217. box-sizing: border-box;
  218. .list {
  219. width: 100%;
  220. height: auto;
  221. margin: 0 0 60rpx 0;
  222. padding: 0 0 40rpx 0;
  223. border-bottom: 1rpx solid #F2F2F2;
  224. .list-title {
  225. margin: 0 0 16rpx 0;
  226. }
  227. .list-num {
  228. margin: 0 0 30rpx 0;
  229. }
  230. .list-data {
  231. display: flex;
  232. align-items: center;
  233. justify-content: space-between;
  234. .list-left {
  235. width: 100%;
  236. .list-left-text {
  237. margin: 0 0 50rpx 0;
  238. }
  239. .list-left-time {
  240. width: 100%;
  241. display: flex;
  242. align-items: center;
  243. justify-content: space-between;
  244. }
  245. }
  246. .list-right {
  247. width: 140rpx;
  248. height: 140rpx;
  249. margin: 0 0 0 40rpx;
  250. flex-shrink: 0;
  251. }
  252. }
  253. }
  254. }
  255. }
  256. }
  257. </style>