index.wxml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <nav type="location" title="首页" frontColor="#ffffff" background-color="#f39283" />
  2. <view class="flexd">
  3. <view class="nav-background"></view>
  4. <view class="v-search">
  5. <van-search bindtap="goUrl" data-url="/nova-tourism/pages/template-2/searching/index"
  6. left-icon="https://file.ruixiuauto.com/cDBRXuM6Xh/20230807/1314fo040350926.png" background="transparent"
  7. placeholder="搜索你想要的生活" shape="round" disabled use-action-slot>
  8. </van-search>
  9. </view>
  10. </view>
  11. <swiper class="swiper" indicator-dots="true" autoplay="true">
  12. <swiper-item wx:for="{{banner}}" wx:key="index">
  13. <image src="{{item.image}}" class="slide-image" mode="aspectFill" />
  14. </swiper-item>
  15. </swiper>
  16. <view class="tabs">
  17. <!-- 导航条 -->
  18. <view class="navBar">
  19. <block wx:for="{{tabs}}" wx:key="item">
  20. <view class="navItem" bindtap="tabsGoUrl" data-index="{{index}}">
  21. <view class="navItemIcon">
  22. <image src="{{item.icon}}" />
  23. </view>
  24. <view class="navItemTitle">{{item.title}}</view>
  25. </view>
  26. </block>
  27. </view>
  28. </view>
  29. <swiper class="rank" indicator-dots="true" autoplay="true">
  30. <swiper-item wx:for="{{rankList}}" wx:key="index">
  31. <view class="item-title">
  32. <view>
  33. <image src="https://file.ruixiuauto.com/cDBRXuM6Xh/20230807/1tcj18050717954.png"
  34. style="width:30rpx;height:30rpx;" />
  35. </view>
  36. <view class="text">{{item.title}}推荐榜</view>
  37. </view>
  38. <van-loading custom-class="loading" wx:if="{{!item.contents.length}}" type="spinner" color="#f39283" />
  39. <view class="content">
  40. <block wx:for="{{item.contents}}" wx:if="{{idx<4}}" wx:for-item="content" wx:key="*this" wx:for-index="idx">
  41. <view class="card" bindtap="rankToDetail" data-key="{{item.title}}" data-id="{{content.objectId}}">
  42. <view class="left">
  43. <view class="ranking">NO.{{idx+1}}</view>
  44. <image src="{{content.bgImg||content.cover}}" />
  45. </view>
  46. <view class="right">
  47. <view class="h1">{{item.title=='村落'?content.name:content.storeName}}</view>
  48. <view class="h3">{{content.shortname||content.storeAddress}}</view>
  49. <view class="h2" wx:if="{{index!=0}}">
  50. <view>{{content.score}}评分推荐</view>
  51. <view class="light">{{content.perCapita}}RMB/人</view>
  52. </view>
  53. <view wx:else class="h2">
  54. <view class="light">{{content.peopleAll}}人</view>
  55. </view>
  56. </view>
  57. </view>
  58. </block>
  59. </view>
  60. </swiper-item>
  61. </swiper>
  62. <view class="play-around">
  63. <view class="play-left">游玩推荐</view>
  64. <view class="play-right" bindtap="goUrl" data-url="/nova-tourism/pages/template-2/searching/index">
  65. <view>更多</view>
  66. <view>
  67. <image src="https://file.ruixiuauto.com/cDBRXuM6Xh/20230807/htl1c8054104079.png"
  68. style="width: 10rpx;height: 19rpx;"></image>
  69. </view>
  70. </view>
  71. </view>
  72. <view class="play-list">
  73. <block wx:for="{{village}}" wx:key="index">
  74. <view class="play-item" bindtap="goUrl" data-url="/nova-tourism/pages/home/village/village-details/index?id={{item.objectId}}">
  75. <view class="item-img">
  76. <view class="item-ranking">HOT</view>
  77. <image src="{{item.bgImg}}"
  78. style="width: 332rpx;height: 308rpx;" />
  79. </view>
  80. <view class="body">
  81. <view class="item-text">
  82. {{item.name}}</view>
  83. <view class="label">
  84. <block wx:for="{{item.related}}" wx:for-item="tag" wx:key="*this">
  85. <view>{{tag}}</view>
  86. </block>
  87. </view>
  88. <view class="detail">
  89. <view class="d-light">{{item.peopleAll}}人</view>
  90. <view>距离 {{item.distances}}km</view>
  91. </view>
  92. </view>
  93. </view>
  94. </block>
  95. </view>