index.wxml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <nav type="back" title="{{objMap[active].title}}" frontColor="#ffffff" background-color="{{activeColor}}" />
  2. <view class="flexd">
  3. <view class="nav-background" style="background-color: {{activeColor}};"></view>
  4. <view class="v-search">
  5. <van-search value="{{ value }}"
  6. background="transparent" placeholder="搜索你想要的生活" shape="round" use-action-slot bind:change="onChange">
  7. </van-search>
  8. </view>
  9. </view>
  10. <view style="margin: 128rpx 0 0 0;">
  11. <van-tabs active="{{active}}" id="tabs" bind:change="tabChange" color="{{activeColor}}"
  12. nav-class="tab_title" animated swipeable>
  13. <van-tab title="村落" />
  14. <van-tab title="美食" />
  15. <van-tab title="民宿" />
  16. <van-tab title="商超" />
  17. </van-tabs>
  18. <scroll-view style="height:calc(100vh - {{stickytop+ 98}}px);" scroll-y="{{true}}" bindscrolltolower="loadMore">
  19. <view wx:if="{{active==0}}" class="box">
  20. <block wx:for="{{listDate}}" wx:key="index">
  21. <view class="hotel" data-item="{{item}}" bindtap="goUrl" data-id="{{item.objectId}}">
  22. <image class="hotel-image" src="{{item.logo || item.bgImg}}" />
  23. <view class="hotel-name">{{item.name}}</view>
  24. <view class="price">
  25. <view class="hotel-price" style="color: {{activeColor}};">
  26. <text class="hotel-price-num">{{item.peopleAll}}</text>
  27. </view>
  28. </view>
  29. <view class="address">
  30. <view class="hotel-address">{{item.address}}</view>
  31. </view>
  32. </view>
  33. </block>
  34. </view>
  35. <view wx:else class="box">
  36. <block wx:if="{{listDate.length}}">
  37. <block wx:for="{{listDate}}" wx:key="index">
  38. <view class="hotel" data-item="{{item}}" bindtap="goUrl" data-id="{{item.objectId}}">
  39. <image class="hotel-image" src="{{item.cover}}" />
  40. <view class="hotel-name">{{item.storeName}}</view>
  41. <view class="price" wx:if="{{active<3}}">
  42. <view class="hotel-price" style="color: {{activeColor}};">
  43. <text class="hotel-price-num">{{item.perCapita}}</text>
  44. <text wx:if="{{active==2}}">/晚</text>
  45. </view>
  46. </view>
  47. <view class="address">
  48. <view class="hotel-address">{{item.address}}</view>
  49. </view>
  50. </view>
  51. </block>
  52. </block>
  53. </view>
  54. <van-empty wx:if="{{!listDate.length}}" description="暂无列表" />
  55. </scroll-view>
  56. </view>