index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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: 'http://rccs.oss-cn-hangzhou.aliyuncs.com/jp-xqjy/banner.png',
  97. },
  98. {
  99. image: 'http://rccs.oss-cn-hangzhou.aliyuncs.com/jp-xqjy/banner.png',
  100. },
  101. {
  102. image: 'http://rccs.oss-cn-hangzhou.aliyuncs.com/jp-xqjy/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. position: fixed;
  126. left: 0;
  127. right: 0;
  128. top: 55px;
  129. background-color: #fff;
  130. z-index: 99;
  131. .homeAdd{
  132. color: #FF5E5E;
  133. span{
  134. margin-left: 3px;
  135. }
  136. }
  137. }
  138. .homeWrap{
  139. padding:0 15px;
  140. margin-top: 44px;
  141. }
  142. .homeUser{
  143. display: flex;
  144. justify-content: space-between;
  145. flex-wrap: wrap;
  146. padding: 15px;
  147. .homeUser-item{
  148. width: 48%;
  149. height: 165px;
  150. margin-bottom: 15px;
  151. position: relative;
  152. color: #fff;
  153. border-radius: 12px;
  154. overflow: hidden;
  155. .homeUser-add{
  156. position: absolute;
  157. z-index: 9;
  158. right: 10px;
  159. top: 10px;
  160. background: rgba(0,0,0,0.5);
  161. padding:2px 5px;
  162. border-radius: 12px;
  163. span{
  164. margin-left: 3px;
  165. font-size: 14px;
  166. }
  167. }
  168. .homeUser-text{
  169. position: absolute;
  170. z-index: 9;
  171. left:0px ;
  172. bottom: 0px;
  173. right: 0;
  174. padding: 10px;
  175. background: linear-gradient( 180deg,rgba(0,0,0,0),rgba(0,0,0,0.5));
  176. }
  177. .homeUser-name{
  178. display: flex;
  179. align-items: center;
  180. span{
  181. margin-right: 3px;
  182. }
  183. }
  184. .homeUser-info{
  185. margin-top: 3px;
  186. }
  187. .homeUser-img{
  188. position: relative;
  189. z-index: 0;
  190. }
  191. }
  192. }
  193. </style>