recommended.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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" v></uni-icons>
  52. </view>
  53. </view>
  54. </scroll-view>
  55. <view class="list-type">
  56. <view class="list-type-l">
  57. <view class="type sys-size-28 sys-weight-600" @click="selectType(1)"
  58. :class="typeNum == 1?'sys-color-black type-border':'sys-color-gray-9'">
  59. 最新
  60. </view>
  61. <view class="type sys-size-28 sys-weight-600" @click="selectType(2)"
  62. :class="typeNum == 2?'sys-color-black type-border':'sys-color-gray-9'">
  63. 最热
  64. </view>
  65. </view>
  66. <view class="list-type-r sys-size-24 sys-color-gray-9">
  67. 1573条动态
  68. </view>
  69. </view>
  70. </view>
  71. <my-praise class="my-praise" :tagNum="1"></my-praise>
  72. </scroll-view>
  73. </view>
  74. </template>
  75. <script>
  76. import MyPraise from "@/pages/my/model/my-praise";
  77. export default {
  78. components: {
  79. MyPraise,
  80. },
  81. data() {
  82. return {
  83. isScroll: false,
  84. listData: [{
  85. 'img': '/static/img/temporary/1.png',
  86. 'name': '今天最想吃什么',
  87. 'num': '10.6'
  88. }, {
  89. 'img': '/static/img/temporary/1.png',
  90. 'name': '今天最想吃什么',
  91. 'num': '10.6'
  92. }, {
  93. 'img': '/static/img/temporary/1.png',
  94. 'name': '今天最想吃什么',
  95. 'num': '10.6'
  96. }, {
  97. 'img': '/static/img/temporary/1.png',
  98. 'name': '今天最想吃什么',
  99. 'num': '10.6'
  100. }],
  101. typeNum: 1,
  102. };
  103. },
  104. mounted() {},
  105. methods: {
  106. scroll(e) {
  107. if (e.detail.scrollTop > 50) {
  108. this.isScroll = true
  109. } else {
  110. this.isScroll = false
  111. }
  112. },
  113. scrolltolower() {
  114. console.log('触底');
  115. },
  116. selectType(num) {
  117. this.typeNum = num
  118. },
  119. },
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .nav-class {
  124. position: absolute;
  125. left: 0;
  126. top: 0;
  127. }
  128. .list-scroll {
  129. width: 100%;
  130. flex: 1;
  131. overflow: auto;
  132. }
  133. .head-bg-img {
  134. width: 100%;
  135. height: 380rpx;
  136. position: relative;
  137. .bg-img {
  138. width: 100%;
  139. height: 100%;
  140. }
  141. .head-title {
  142. width: 100%;
  143. height: auto;
  144. position: absolute;
  145. left: 0;
  146. bottom: 40rpx;
  147. display: flex;
  148. justify-content: space-between;
  149. box-sizing: border-box;
  150. padding: 0 26rpx 0 32rpx;
  151. .head-title-l {
  152. display: flex;
  153. align-items: center;
  154. .head-title-l-img {
  155. width: 120rpx;
  156. height: 120rpx;
  157. margin: 0 24rpx 0 0;
  158. }
  159. .head-title-l-name {
  160. display: flex;
  161. flex-direction: column;
  162. .head-title-l-name-one {
  163. display: flex;
  164. align-items: center;
  165. margin: 0 0 22rpx 0;
  166. .icon {
  167. width: 40rpx;
  168. height: 40rpx;
  169. margin: 0 8rpx 0 0;
  170. }
  171. }
  172. .head-title-l-name-two {}
  173. }
  174. }
  175. .head-title-r {
  176. padding: 0 32rpx;
  177. box-sizing: border-box;
  178. }
  179. }
  180. .placeholder-box {
  181. width: 100%;
  182. height: 20rpx;
  183. // background: #333;
  184. position: absolute;
  185. bottom: 0;
  186. .placeholder {
  187. width: 100%;
  188. height: 100%;
  189. border-radius: 32rpx 32rpx 0 0;
  190. background: #fff;
  191. }
  192. }
  193. }
  194. .topic-box {
  195. width: 100%;
  196. height: auto;
  197. display: flex;
  198. flex-direction: column;
  199. .topic-title {
  200. margin: 0 0 24rpx 32rpx;
  201. }
  202. .topic-list {
  203. width: 100%;
  204. padding: 0 12rpx;
  205. display: flex;
  206. align-items: center;
  207. white-space: nowrap;
  208. box-sizing: border-box;
  209. margin: 0 0 40rpx 0;
  210. .list {
  211. display: inline-block;
  212. width: 476rpx;
  213. height: 138rpx;
  214. // display: flex;
  215. margin: 0 12rpx;
  216. padding: 18rpx;
  217. box-sizing: border-box;
  218. align-items: center;
  219. justify-content: space-between;
  220. position: relative;
  221. flex: 1;
  222. .list-left {
  223. display: flex;
  224. align-items: center;
  225. .list-img {
  226. width: 104rpx;
  227. height: 104rpx;
  228. margin: 0 20rpx 0 0;
  229. }
  230. .list-text {}
  231. }
  232. .goto-img {
  233. width: 32rpx;
  234. height: 32rpx;
  235. display: flex;
  236. justify-content: center;
  237. align-items: center;
  238. position: absolute;
  239. right: 32rpx;
  240. top: 40%;
  241. }
  242. }
  243. }
  244. .list-type {
  245. display: flex;
  246. // align-items: center;
  247. justify-content: space-between;
  248. padding: 0 32rpx;
  249. border-bottom: 1rpx solid #F2F2F2;
  250. .list-type-l {
  251. display: flex;
  252. align-items: center;
  253. .type {
  254. padding: 0 0 26rpx 0;
  255. margin: 0 60rpx 0 0;
  256. }
  257. .type-border {
  258. border-bottom: 4rpx solid #000000;
  259. }
  260. }
  261. .list-type-r {}
  262. }
  263. }
  264. </style>