topic.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <view class="topic 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="placeholder-box">
  9. <view class="placeholder"></view>
  10. </view>
  11. </view>
  12. <view class="content-box">
  13. <view class="title-box">
  14. <view class="title-box-left">
  15. <view
  16. class="icon sys-height-40 sys-radius-round sys-background-black sys-color-white sys-weight-600">
  17. #
  18. </view>
  19. <view class="title-name sys-weight-600">
  20. 我最爱的OOTD
  21. </view>
  22. </view>
  23. <view
  24. class="title-box-right sys-background-black sys-radius-12 sys-color-white sys-size-28 sys-height-56">
  25. 关注
  26. </view>
  27. </view>
  28. <view class="list-type">
  29. <view class="list-type-l">
  30. <view class="type sys-size-28 sys-weight-600" @click="selectType(1)"
  31. :class="typeNum == 1?'sys-color-black type-border':'sys-color-gray-9'">
  32. 最新
  33. </view>
  34. <view class="type sys-size-28 sys-weight-600" @click="selectType(2)"
  35. :class="typeNum == 2?'sys-color-black type-border':'sys-color-gray-9'">
  36. 最热
  37. </view>
  38. </view>
  39. <view class="list-type-r sys-size-24 sys-color-gray-9">
  40. 1573条动态
  41. </view>
  42. </view>
  43. <MyPraise class="my-praise" :tagNum="1"></MyPraise>
  44. </view>
  45. </scroll-view>
  46. </view>
  47. </template>
  48. <script>
  49. import MyPraise from "@/pages/my/model/my-praise";
  50. export default {
  51. components: {
  52. MyPraise,
  53. },
  54. data() {
  55. return {
  56. isScroll: false,
  57. typeNum: 1,
  58. };
  59. },
  60. mounted() {},
  61. methods: {
  62. scroll(e) {
  63. if (e.detail.scrollTop > 50) {
  64. this.isScroll = true
  65. } else {
  66. this.isScroll = false
  67. }
  68. },
  69. scrolltolower() {
  70. console.log('触底');
  71. },
  72. selectType(num) {
  73. this.typeNum = num
  74. },
  75. },
  76. }
  77. </script>
  78. <style lang="scss" scoped>
  79. .topic {
  80. .nav-class {
  81. position: absolute;
  82. left: 0;
  83. top: 0;
  84. }
  85. .list-scroll {
  86. width: 100%;
  87. flex: 1;
  88. overflow: auto;
  89. .head-bg-img {
  90. width: 100%;
  91. height: 352rpx;
  92. position: relative;
  93. .bg-img {
  94. width: 100%;
  95. height: 100%;
  96. }
  97. .placeholder-box {
  98. width: 100%;
  99. height: 48rpx;
  100. // background: #333;
  101. position: absolute;
  102. bottom: 0;
  103. .placeholder {
  104. width: 100%;
  105. height: 100%;
  106. border-radius: 32rpx 32rpx 0 0;
  107. background: #fff;
  108. }
  109. }
  110. }
  111. .content-box {
  112. width: 100%;
  113. height: auto;
  114. display: flex;
  115. flex-direction: column;
  116. .title-box {
  117. width: 100%;
  118. height: auto;
  119. display: flex;
  120. align-items: center;
  121. justify-content: space-between;
  122. padding: 0 32rpx;
  123. box-sizing: border-box;
  124. margin: 0 0 50rpx 0;
  125. .title-box-left {
  126. display: flex;
  127. align-items: center;
  128. .icon {
  129. width: 40rpx;
  130. margin: 0 8rpx 0 0;
  131. text-align: center;
  132. }
  133. .title-name {}
  134. }
  135. .title-box-right {
  136. padding: 0 32rpx;
  137. }
  138. }
  139. .list-type {
  140. display: flex;
  141. // align-items: center;
  142. justify-content: space-between;
  143. padding: 0 32rpx;
  144. border-bottom: 1rpx solid #F2F2F2;
  145. .list-type-l {
  146. display: flex;
  147. align-items: center;
  148. .type {
  149. padding: 0 0 26rpx 0;
  150. margin: 0 60rpx 0 0;
  151. }
  152. .type-border {
  153. border-bottom: 4rpx solid #000000;
  154. }
  155. }
  156. .list-type-r {}
  157. }
  158. }
  159. }
  160. }
  161. </style>