topicPlaza.vue 7.1 KB

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