recommended.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <template>
  2. <view class="flex-common-css">
  3. <Nav class="nav-class" :bgckgroundBox="!isScroll?'transparent':'#fff'" :titleColor="isScroll?'#000':'#fff'">
  4. </Nav>
  5. <scroll-view :scroll-y="true" class="list-scroll" @scroll="scroll" @scrolltolower="scrolltolower">
  6. <view class="head-bg-img">
  7. <image class="bg-img" src="@/static/img/circle/1.png" mode=""></image>
  8. <view class="head-title">
  9. <view class="head-title-l">
  10. <image class="head-title-l-img sys-radius-12" src="@/static/img/circle/1.png" mode=""></image>
  11. <view class="head-title-l-name">
  12. <view class="head-title-l-name-one">
  13. <image class="icon" src="@/static/img/circle/1.png" mode=""></image>
  14. <view class="sys-size-36 sys-weight-600 sys-color-white">
  15. 圈子标题名称
  16. </view>
  17. </view>
  18. <view class="sys-size-28 sys-color-white">
  19. 815.4w人在这里
  20. </view>
  21. </view>
  22. </view>
  23. <view
  24. class="head-title-r sys-height-56 sys-color-black sys-size-28 sys-background-gray-f sys-radius-12">
  25. 加入
  26. </view>
  27. </view>
  28. <view class="placeholder-box">
  29. <view class="placeholder"></view>
  30. </view>
  31. </view>
  32. <view class="topic-box">
  33. <view class="topic-title sys-color-black sys-weight-600 sys-size-28">
  34. 热聊话题
  35. </view>
  36. <scroll-view scroll-x="true" class="topic-list">
  37. <view class="list sys-background-gray-6f sys-radius-20" v-for="(item,index) in listData"
  38. :key="index">
  39. <view class="list-left">
  40. <image class="list-img sys-radius-12" :src="item.img" mode=""></image>
  41. <view class="list-text">
  42. <view class="sys-size-32 sys-weight-600 sys-color-black">
  43. {{item.name}}
  44. </view>
  45. <view class="sys-color-gray-9 sys-size-24">
  46. {{item.num}}w人在看
  47. </view>
  48. </view>
  49. </view>
  50. <view class="goto-img sys-background-gray-E0 sys-radius-round">
  51. <uni-icons type="right" size="12" color="#666"></uni-icons>
  52. </view>
  53. </view>
  54. </scroll-view>
  55. </view>
  56. <my-praise class="my-praise" :tagNum="1"></my-praise>
  57. </scroll-view>
  58. </view>
  59. </template>
  60. <script>
  61. import MyPraise from "@/pages/my/model/my-praise";
  62. export default {
  63. components: {
  64. MyPraise,
  65. },
  66. data() {
  67. return {
  68. isScroll: false,
  69. listData: [{
  70. 'img': '/static/img/temporary/1.png',
  71. 'name': '今天最想吃什么',
  72. 'num': '10.6'
  73. }, {
  74. 'img': '/static/img/temporary/1.png',
  75. 'name': '今天最想吃什么',
  76. 'num': '10.6'
  77. }, {
  78. 'img': '/static/img/temporary/1.png',
  79. 'name': '今天最想吃什么',
  80. 'num': '10.6'
  81. }, {
  82. 'img': '/static/img/temporary/1.png',
  83. 'name': '今天最想吃什么',
  84. 'num': '10.6'
  85. }],
  86. };
  87. },
  88. mounted() {},
  89. methods: {
  90. scroll(e) {
  91. if (e.detail.scrollTop > 50) {
  92. this.isScroll = true
  93. } else {
  94. this.isScroll = false
  95. }
  96. },
  97. scrolltolower() {
  98. console.log('触底');
  99. }
  100. },
  101. }
  102. </script>
  103. <style lang="scss" scoped>
  104. .nav-class {
  105. position: absolute;
  106. left: 0;
  107. top: 0;
  108. }
  109. .list-scroll {
  110. width: 100%;
  111. flex: 1;
  112. overflow: auto;
  113. }
  114. .head-bg-img {
  115. width: 100%;
  116. height: 380rpx;
  117. position: relative;
  118. .bg-img {
  119. width: 100%;
  120. height: 100%;
  121. }
  122. .head-title {
  123. width: 100%;
  124. height: auto;
  125. position: absolute;
  126. left: 0;
  127. bottom: 40rpx;
  128. display: flex;
  129. justify-content: space-between;
  130. box-sizing: border-box;
  131. padding: 0 26rpx 0 32rpx;
  132. .head-title-l {
  133. display: flex;
  134. align-items: center;
  135. .head-title-l-img {
  136. width: 120rpx;
  137. height: 120rpx;
  138. margin: 0 24rpx 0 0;
  139. }
  140. .head-title-l-name {
  141. display: flex;
  142. flex-direction: column;
  143. .head-title-l-name-one {
  144. display: flex;
  145. align-items: center;
  146. margin: 0 0 22rpx 0;
  147. .icon {
  148. width: 40rpx;
  149. height: 40rpx;
  150. margin: 0 8rpx 0 0;
  151. }
  152. }
  153. .head-title-l-name-two {}
  154. }
  155. }
  156. .head-title-r {
  157. padding: 0 32rpx;
  158. box-sizing: border-box;
  159. }
  160. }
  161. .placeholder-box {
  162. width: 100%;
  163. height: 20rpx;
  164. // background: #333;
  165. position: absolute;
  166. bottom: 0;
  167. .placeholder {
  168. width: 100%;
  169. height: 100%;
  170. border-radius: 32rpx 32rpx 0 0;
  171. background: #fff;
  172. }
  173. }
  174. }
  175. .topic-box {
  176. width: 100%;
  177. height: auto;
  178. display: flex;
  179. flex-direction: column;
  180. .topic-title {
  181. margin: 0 0 24rpx 32rpx;
  182. }
  183. .topic-list {
  184. width: 100%;
  185. padding: 0 12rpx;
  186. display: flex;
  187. align-items: center;
  188. white-space: nowrap;
  189. box-sizing: border-box;
  190. .list {
  191. display: inline-block;
  192. width: 476rpx;
  193. height: 138rpx;
  194. // display: flex;
  195. margin: 0 12rpx;
  196. padding: 18rpx;
  197. box-sizing: border-box;
  198. align-items: center;
  199. justify-content: space-between;
  200. position: relative;
  201. flex: 1;
  202. .list-left {
  203. display: flex;
  204. align-items: center;
  205. .list-img {
  206. width: 104rpx;
  207. height: 104rpx;
  208. margin: 0 20rpx 0 0;
  209. }
  210. .list-text {}
  211. }
  212. .goto-img {
  213. width: 32rpx;
  214. height: 32rpx;
  215. display: flex;
  216. justify-content: center;
  217. align-items: center;
  218. position: absolute;
  219. right: 32rpx;
  220. top: 40%;
  221. }
  222. }
  223. }
  224. }
  225. </style>