index.wxml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <!-- <nav type="title" background-color="#46a9a4" title="首页" /> -->
  2. <nav type="title" background-color="#46a9a4" title="首页" frontColor="#ffffff" />
  3. <view class="location">
  4. <view class="l_left">
  5. <van-icon name="https://cloud.file.futurestack.cn/F87DmDd4qN/20230327/1loeus105642.png" />
  6. 阜康市
  7. </view>
  8. <view class="l_right">
  9. 已有<span>5,666</span>人打卡自己自由之旅
  10. </view>
  11. </view>
  12. <van-search value="{{ value }}" placeholder="请输入搜索关键词" shape="round" use-action-slot bind:change="onChange" bind:search="onSearch">
  13. </van-search>
  14. <swiper class="swiper" indicator-dots="true" autoplay="true">
  15. <swiper-item wx:for="{{banners}}" wx:key="index">
  16. <image src="{{item.image}}" class="slide-image" mode="aspectFill" />
  17. </swiper-item>
  18. </swiper>
  19. <view class="tabs">
  20. <!-- 导航条 -->
  21. <view class="navBar">
  22. <block wx:for="{{tabs}}" wx:key="item">
  23. <view id="{{index}}" class="navItem {{tabIndex == index ? 'active' : '' }}" bindtap="onTabClick">
  24. <view class="navItemIcon">
  25. <image src="{{item.icon}}" />
  26. </view>
  27. <view class="navItemTitle">{{item.title}}</view>
  28. </view>
  29. </block>
  30. </view>
  31. <!-- 内容区域 -->
  32. <view class="nav_content">
  33. <block wx:if="{{tabIndex == 0}}">
  34. <view class="sidebar">
  35. <view class="left">
  36. <block wx:for="{{department}}" wx:key="item">
  37. <view id="{{index}}" class="sidebarItem {{sidebarIndex == index ? 'active' : '' }}" bindtap="onSidebarClick">
  38. <view class="sidebarItemTime">{{item.peopleAll}}人</view>
  39. <view class="sidebarItemText">{{item.name}}</view>
  40. </view>
  41. </block>
  42. </view>
  43. <view class="sidebar_content">
  44. <block wx:if="{{department[sidebarIndex]}}">
  45. <view class="village">
  46. <!-- <block wx:for="{{department}}" wx:key="index"> -->
  47. <view class="homestay" bindtap="villagedetails" data-item="{{department[sidebarIndex]}}">
  48. <block wx:if="{{department[sidebarIndex].logoType == 'image'}}">
  49. <image class="homestay-image" src="{{department[sidebarIndex].logo}}" />
  50. </block>
  51. <block wx:if="{{department[sidebarIndex].logoType == 'video'}}">
  52. <video class="homestay-image" initial-time='0.01' controls="true" catchtap="player" poster="{{department[sidebarIndex].bgImg}}" src="{{department[sidebarIndex].logo}}">
  53. </video>
  54. <cover-view class="controls pr" id="controls">
  55. <!--视频 封面图片 -->
  56. <cover-image src="{{department[sidebarIndex].bgImg}}" class="homestay-images" />
  57. </cover-view>
  58. </block>
  59. <view class="title1">
  60. <view class="title_left">
  61. <text class="homestay-name" space="nbsp">{{department[sidebarIndex].name}} <text class="price">{{department[sidebarIndex].peopleAll}}人</text></text>
  62. </view>
  63. <text class="homestay-address">{{department[sidebarIndex].address}}</text>
  64. </view>
  65. <button class="button">GO</button>
  66. </view>
  67. <!-- </block> -->
  68. </view>
  69. </block>
  70. </view>
  71. </view>
  72. </block>
  73. <block wx:if="{{tabIndex == 1}}">
  74. <view class="title">
  75. <view class="recommended-box">
  76. <view class="recommended-icon"></view>
  77. <view class="recommended">美食推荐</view>
  78. </view>
  79. <view bind:tap="foodlist">
  80. 更多
  81. <van-icon name="arrow" />
  82. </view>
  83. </view>
  84. </block>
  85. <block wx:if="{{tabIndex == 2}}">
  86. <view class="title">
  87. <view class="recommended-box">
  88. <view class="recommended-icon"></view>
  89. <view class="recommended">民宿推荐</view>
  90. </view>
  91. <view bindtap="homestay">
  92. 更多
  93. <van-icon name="arrow" />
  94. </view>
  95. </view>
  96. <!-- <view class="kong">
  97. <block wx:for="{{homestay}}" wx:key="index">
  98. <view class="homestay" bindtap="hoteldetails" data-item="{{item}}">
  99. <image class="homestay-image" src="{{item.cover}}" />
  100. <view class="homestay-name">{{item.storeName}}</view>
  101. <view class="homestay-price">
  102. <view class="price">{{item.perCapita}}</view>
  103. /晚
  104. </view>
  105. <view class="homestay-address">{{item.storeAddress}}</view>
  106. </view>
  107. </block>
  108. </view> -->
  109. </block>
  110. <!-- <block wx:if="{{tabIndex == 3}}">
  111. <view class="title">
  112. <view class="recommended-box">
  113. <view class="recommended-icon"></view>
  114. <view class="recommended">商超推荐</view>
  115. </view>
  116. <view bindtap="homestay">
  117. 更多
  118. <van-icon name="arrow" />
  119. </view>
  120. </view>
  121. </block> -->
  122. <view class="kong" wx:if="{{tabIndex > 0 }}">
  123. <block wx:for="{{listDate}}" wx:key="index">
  124. <view class="homestay" bindtap="storepackage" data-item="{{item}}">
  125. <image class="homestay-image" src="{{item.cover}}" />
  126. <view class="homestay-name">{{item.storeName}}</view>
  127. <view class="homestay-price">
  128. ¥<view class="price">{{item.perCapita}}</view>/人
  129. </view>
  130. <view class="homestay-address">{{item.storeAddress}}</view>
  131. </view>
  132. </block>
  133. </view>
  134. </view>
  135. </view>
  136. <!-- <view class="tabs">
  137. <van-tabs active="{{ active }}" title-active-color="#3a3a3a" title-inactive-color="#a7a6a6">
  138. <van-tab title="村落推荐" title-style="margin_left:-40rpx;display:block">
  139. <view class="sidebar">
  140. <van-sidebar active-key="{{ activeKey }}" custom-class="van-sidebar-size">
  141. <van-sidebar-item title="今日首推景点" custom-class="van-sidebar-item-bg"></van-sidebar-item>
  142. <van-sidebar-item title="今日特惠景点" custom-class="van-sidebar-item-bg"></van-sidebar-item>
  143. <van-sidebar-item title="今日热门景点" custom-class="van-sidebar-item-bg"></van-sidebar-item>
  144. </van-sidebar>
  145. <view>
  146. </view>
  147. </view>
  148. </van-tab>
  149. <van-tab title="美食推荐" title-style="margin_left:-40rpx;display:block">
  150. <view>
  151. </view>
  152. </van-tab>
  153. <van-tab title="民宿推荐" title-style="margin_left:-40rpx;display:block">
  154. <view>
  155. </view>
  156. </van-tab>
  157. <van-tab title="商超推荐" title-style="margin_left:-40rpx;display:block">
  158. <view>
  159. </view>
  160. </van-tab>
  161. </van-tabs>
  162. </view> -->
  163. <!-- <view class="title">
  164. <view class="recommended-box">
  165. <view class="recommended-icon"></view>
  166. <view class="recommended">村落推荐</view>
  167. </view>
  168. <view bind:tap="village">
  169. 更多
  170. <van-icon name="arrow" />
  171. </view>
  172. </view>
  173. <view class="village">
  174. <block wx:for="{{department}}" wx:key="index">
  175. <view class="homestay" bindtap="villagedetails" data-item="{{item}}">
  176. <block wx:if="{{item.logoType == 'image'}}">
  177. <image class="homestay-image" src="{{item.logo}}" />
  178. </block>
  179. <block wx:if="{{item.logoType == 'video'}}">
  180. <video class="homestay-image" initial-time='0.01' controls="true" catchtap="player"
  181. poster="{{item.bgImg}}" src="{{item.logo}}">
  182. </video>
  183. <cover-view class="controls pr" id="controls"> -->
  184. <!--视频 封面图片 -->
  185. <!-- <cover-image src="{{item.bgImg}}" class="homestay-images" />
  186. </cover-view>
  187. </block>
  188. <view class="homestay-name">{{item.name}}</view>
  189. <view class="homestay-price">
  190. <view class="price">{{item.peopleAll}}</view>
  191. </view>
  192. <view class="homestay-address">{{item.address}}</view>
  193. </view>
  194. </block>
  195. </view> -->
  196. <!-- <view class="title">
  197. <view class="recommended-box">
  198. <view class="recommended-icon"></view>
  199. <view class="recommended">美食推荐</view>
  200. </view>
  201. <view bind:tap="foodlist">
  202. 更多
  203. <van-icon name="arrow" />
  204. </view>
  205. </view>
  206. <view class="kong">
  207. <block wx:for="{{food}}" wx:key="index">
  208. <view class="homestay" bindtap="storepackage" data-item="{{item}}">
  209. <image class="homestay-image" src="{{item.cover}}" />
  210. <view class="homestay-name">{{item.storeName}}</view>
  211. <view class="homestay-price">
  212. ¥<view class="price">{{item.perCapita}}</view>/人
  213. </view>
  214. <view class="homestay-address">{{item.storeAddress}}</view>
  215. </view>
  216. </block>
  217. </view>
  218. <view class="title">
  219. <view class="recommended-box">
  220. <view class="recommended-icon"></view>
  221. <view class="recommended">民宿推荐</view>
  222. </view>
  223. <view bindtap="homestay">
  224. 更多
  225. <van-icon name="arrow" />
  226. </view>
  227. </view>
  228. <view class="kong">
  229. <block wx:for="{{homestay}}" wx:key="index">
  230. <view class="homestay" bindtap="hoteldetails" data-item="{{item}}">
  231. <image class="homestay-image" src="{{item.cover}}" />
  232. <view class="homestay-name">{{item.storeName}}</view>
  233. <view class="homestay-price">
  234. <view class="price">{{item.perCapita}}</view>
  235. /晚
  236. </view>
  237. <view class="homestay-address">{{item.storeAddress}}</view>
  238. </view>
  239. </block>
  240. </view> -->