index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view>
  3. <u-navbar :is-back="false" :border-bottom="false"><img class="homeLogo" src="/static/img/homeLogo.png" alt=""></u-navbar>
  4. <view class="home-head">
  5. <view class="homeTab">
  6. <u-tabs :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
  7. </view>
  8. <view class="homeAdd">
  9. <u-icon custom-prefix="custom-icon" name="map-pin-2-fill"></u-icon>
  10. <span>荆州市</span>
  11. </view>
  12. </view>
  13. <view class="homeWrap">
  14. <u-swiper :list="wrapList" height="300" border-radius="24"></u-swiper>
  15. </view>
  16. <view class="homeUser">
  17. <view class="homeUser-item">
  18. <view class="homeUser-add">
  19. <u-icon custom-prefix="custom-icon" name="map-pin-2-fill"></u-icon>
  20. <span>荆州</span>
  21. </view>
  22. <view class="homeUser-text">
  23. <view class="homeUser-name">
  24. <span>刘子琪</span>
  25. <u-icon custom-prefix="custom-icon" name="women-line" color="#FF695B"></u-icon>
  26. </view>
  27. <view class="homeUser-info">
  28. 24岁 · 160cm · 51kg
  29. </view>
  30. </view>
  31. <u-image class="homeUser-img" src="/static/img/user1.jpg" height="330" mode="aspectFill"></u-image>
  32. </view>
  33. <view class="homeUser-item">
  34. <view class="homeUser-add">
  35. <u-icon custom-prefix="custom-icon" name="map-pin-2-fill"></u-icon>
  36. <span>荆州</span>
  37. </view>
  38. <view class="homeUser-text">
  39. <view class="homeUser-name">
  40. <span>刘子琪</span>
  41. <u-icon custom-prefix="custom-icon" name="men-line" color="#1677FF"></u-icon>
  42. </view>
  43. <view class="homeUser-info">
  44. 24岁 · 160cm · 51kg
  45. </view>
  46. </view>
  47. <u-image src="/static/img/user2.jpg" height="330" mode="aspectFill"></u-image>
  48. </view>
  49. <view class="homeUser-item">
  50. <view class="homeUser-add">
  51. <u-icon custom-prefix="custom-icon" name="map-pin-2-fill"></u-icon>
  52. <span>荆州</span>
  53. </view>
  54. <view class="homeUser-text">
  55. <view class="homeUser-name">
  56. <span>刘子琪</span>
  57. <u-icon custom-prefix="custom-icon" name="men-line" color="#1677FF"></u-icon>
  58. </view>
  59. <view class="homeUser-info">
  60. 24岁 · 160cm · 51kg
  61. </view>
  62. </view>
  63. <u-image src="/static/img/user3.jpg" height="330" mode="aspectFill"></u-image>
  64. </view>
  65. <view class="homeUser-item">
  66. <view class="homeUser-add">
  67. <u-icon custom-prefix="custom-icon" name="map-pin-2-fill"></u-icon>
  68. <span>荆州</span>
  69. </view>
  70. <view class="homeUser-text">
  71. <view class="homeUser-name">
  72. <span>刘子琪</span>
  73. <u-icon custom-prefix="custom-icon" name="women-line" color="#FF695B"></u-icon>
  74. </view>
  75. <view class="homeUser-info">
  76. 24岁 · 160cm · 51kg
  77. </view>
  78. </view>
  79. <u-image src="/static/img/user4.jpg" height="330" mode="aspectFill"></u-image>
  80. </view>
  81. <u-divider color="#B6BDC3" style="margin-top:20px;">已经到底了</u-divider>
  82. </view>
  83. </view>
  84. </template>
  85. <script>
  86. export default {
  87. data() {
  88. return {
  89. tabList: [{
  90. name: '最新'
  91. }, {
  92. name: '最热'
  93. }],
  94. current: 0,
  95. wrapList: [{
  96. image: '/static/img/banner.png',
  97. },
  98. {
  99. image: '/static/img/banner.png',
  100. },
  101. {
  102. image: '/static/img/banner.png',
  103. }
  104. ],
  105. }
  106. },
  107. methods: {
  108. change(index) {
  109. this.current = index;
  110. }
  111. }
  112. }
  113. </script>
  114. <style lang="scss" scoped>
  115. .homeLogo{
  116. margin-left: 15px;
  117. height: 28px;
  118. width: 148px;
  119. }
  120. .home-head{
  121. display: flex;
  122. justify-content: space-between;
  123. align-items: center;
  124. padding-right: 15px;
  125. .homeAdd{
  126. color: #FF5E5E;
  127. span{
  128. margin-left: 3px;
  129. }
  130. }
  131. }
  132. .homeWrap{
  133. padding:0 15px;
  134. }
  135. .homeUser{
  136. display: flex;
  137. justify-content: space-between;
  138. flex-wrap: wrap;
  139. padding: 15px;
  140. .homeUser-item{
  141. width: 48%;
  142. height: 165px;
  143. margin-bottom: 15px;
  144. position: relative;
  145. color: #fff;
  146. border-radius: 12px;
  147. overflow: hidden;
  148. .homeUser-add{
  149. position: absolute;
  150. z-index: 9;
  151. right: 10px;
  152. top: 10px;
  153. background: rgba(0,0,0,0.5);
  154. padding:2px 5px;
  155. border-radius: 12px;
  156. span{
  157. margin-left: 3px;
  158. font-size: 14px;
  159. }
  160. }
  161. .homeUser-text{
  162. position: absolute;
  163. z-index: 9;
  164. left:0px ;
  165. bottom: 0px;
  166. right: 0;
  167. padding: 10px;
  168. background: linear-gradient( 180deg,rgba(0,0,0,0),rgba(0,0,0,0.5));
  169. }
  170. .homeUser-name{
  171. display: flex;
  172. align-items: center;
  173. span{
  174. margin-right: 3px;
  175. }
  176. }
  177. .homeUser-info{
  178. margin-top: 3px;
  179. }
  180. .homeUser-img{
  181. position: relative;
  182. z-index: 0;
  183. }
  184. }
  185. }
  186. </style>