海南旅游项目 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

230 lines
5.1 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <view>
  3. <swiper class="head" :current="banner_current" >
  4. <swiper-item>
  5. <image src="https://picsum.photos/375/360" class="swipe-img"></image>
  6. </swiper-item>
  7. <swiper-item>
  8. <image src="https://picsum.photos/375/360" class="swipe-img"></image>
  9. </swiper-item>
  10. </swiper>
  11. <view class="content">
  12. <!-- 消息模块 -->
  13. <view class="lf-row-between lf-m-b-34 message-box">
  14. <view class="lf-flex">
  15. <u-icon name="lock-fill lf-text-vertical"></u-icon>
  16. <view class="lf-m-l-12 lf-line-1" style="max-width: 510rpx;">国庆优惠大促快来看看吧</view>
  17. </view>
  18. <view class="message-btn" hover-class="lf-opacity">详情</view>
  19. </view>
  20. <!-- 频道 -->
  21. <view class="lf-row-between lf-m-b-10">
  22. <view class="lf-font-36 lf-font-bold lf-color-333">添加频道</view>
  23. <view class="lf-flex lf-color-555">
  24. <view class="lf-m-r-10">编辑</view>
  25. <u-icon name="lock-fill lf-text-vertical"></u-icon>
  26. </view>
  27. </view>
  28. <view class="lf-flex-wrap">
  29. <view class="channel-item" v-for="(item, index) in 8">
  30. <image src="../../static/logo.png" class="channel-mask" mode="aspectFill"></image>
  31. <view>
  32. <u-icon name="lock-fill lf-text-vertical"></u-icon>
  33. </view>
  34. </view>
  35. </view>
  36. <!-- 中间广告模块 -->
  37. <swiper class="lf-m-t-40 ad" :current="banner_current" >
  38. <swiper-item>
  39. <image src="https://picsum.photos/375/230" class="lf-w-100 lf-h-100"></image>
  40. </swiper-item>
  41. </swiper>
  42. <!-- 精品推荐 -->
  43. <view class="lf-row-between lf-m-t-40">
  44. <view class="lf-font-36 lf-font-bold lf-color-333">精品推荐</view>
  45. <view class="lf-flex lf-color-555">
  46. <view class="lf-m-r-10">更多</view>
  47. <u-icon name="lock-fill lf-text-vertical"></u-icon>
  48. </view>
  49. </view>
  50. <view class="recomm lf-m-t-20">
  51. <view class="lf-row-between">
  52. <view class="max-recomm-img">
  53. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  54. </view>
  55. <view>
  56. <view class="recomm-img">
  57. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  58. </view>
  59. <view class="recomm-img lf-m-t-10">
  60. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="lf-row-between lf-m-t-10">
  65. <view class="recomm-img">
  66. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  67. </view>
  68. <view class="recomm-img">
  69. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  70. </view>
  71. <view class="recomm-img">
  72. <image src="../../static/logo.png" class="lf-w-100 lf-h-100"></image>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- tab标签 -->
  77. <view class="lf-m-t-40">
  78. <u-tabs :list="tab_list" :is-scroll="true" :current="current" @change="tabChange"></u-tabs>
  79. </view>
  80. </view>
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. data() {
  86. return {
  87. banner_current: 0,
  88. tab_list: [{
  89. name: '推荐',
  90. list: []
  91. },{
  92. name: '酒店',
  93. list: []
  94. },{
  95. name: '推荐',
  96. list: []
  97. },{
  98. name: '酒店',
  99. list: []
  100. },{
  101. name: '推荐',
  102. list: []
  103. },{
  104. name: '酒店',
  105. list: []
  106. }],
  107. current: 0
  108. }
  109. },
  110. onLoad() {
  111. },
  112. methods: {
  113. tabChange(current){
  114. this.current = current;
  115. }
  116. },
  117. onPullDownRefresh(){
  118. uni.stopPullDownRefresh();
  119. }
  120. }
  121. </script>
  122. <style>
  123. page{
  124. background-color: #F6F6F6;
  125. }
  126. </style>
  127. <style lang="scss" scoped>
  128. .head{
  129. width: 750rpx;
  130. height: 360rpx;
  131. .swipe-img{
  132. width: 100%;
  133. height: 100%;
  134. }
  135. }
  136. .content{
  137. width: 750rpx;
  138. // height: 600rpx;
  139. height: max-content;
  140. border-radius: 30rpx 30rpx 0rpx 0rpx;
  141. position: relative;
  142. top: -30rpx;
  143. background-color: #FFFFFF;
  144. box-sizing: border-box;
  145. padding: 40rpx 32rpx 10rpx;
  146. .message-box{
  147. width: 686rpx;
  148. height: 53rpx;
  149. background: #CFE7FD;
  150. border-radius: 27rpx;
  151. color: #1998FE;
  152. box-sizing: border-box;
  153. padding: 0 20rpx;
  154. font-size: 24rpx;
  155. .message-btn{
  156. width: 80rpx;
  157. height: 33rpx;
  158. border-radius: 10rpx;
  159. border: 1rpx solid #1998FE;
  160. text-align: center;
  161. line-height: 31rpx;
  162. }
  163. }
  164. }
  165. .channel-item{
  166. width: 160rpx;
  167. height: 160rpx;
  168. border-radius: 15rpx;
  169. margin-top: 15rpx;
  170. margin-right: 15rpx;
  171. position: relative;
  172. overflow: hidden;
  173. &:nth-child(4n){
  174. margin-right: 0;
  175. }
  176. image{
  177. width: 160rpx;
  178. height: 160rpx;
  179. position: absolute;
  180. z-index: 0;
  181. }
  182. view{
  183. position: absolute;
  184. right: 0;
  185. bottom: 0;
  186. background-color: rgba(255,255,255,0.5);
  187. width: 42rpx;
  188. height: 42rpx;
  189. color: #FFFFFF;
  190. display: flex;
  191. justify-content: center;
  192. align-items: center;
  193. border-radius: 10rpx 0rpx 15rpx 0rpx;
  194. z-index: 2;
  195. }
  196. .channel-mask::after{
  197. width: 100%;
  198. height: 100%;
  199. content: '';
  200. position: absolute;
  201. z-index: 1;
  202. background: rgba(0, 0, 0, 0.5);
  203. top: 0;
  204. left: 0;
  205. }
  206. }
  207. .ad{
  208. height: 230rpx;
  209. width: 100%;
  210. }
  211. .recomm{
  212. width: 100%;
  213. height: max-content;
  214. .recomm-img{
  215. width: 222rpx;
  216. height: 222rpx;
  217. border-radius: 10rpx;
  218. }
  219. .max-recomm-img{
  220. width: 455rpx;
  221. height: 455rpx;
  222. }
  223. }
  224. </style>