index.wxml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <nav type="back" background-color="{{activeColor}}" title="美食预定" frontColor="#ffffff" />
  2. <van-search value="{{ value }}" placeholder="请输入搜索关键词" background="{{activeColor}}" shape="round" use-action-slot bind:change="onChan" bind:search="onSearch">
  3. <!-- <view slot="action" bind:tap="onClick">搜索</view> -->
  4. </van-search>
  5. <van-tabs id="show" active="{{ active }}" bind:change="onChange" color="{{activeColor}}">
  6. <van-tab title="推荐">
  7. <scroll-view style="height:calc(100vh - {{stickytop+ 98}}px);" scroll-y="{{true}}">
  8. <view class="box">
  9. <block wx:for="{{list}}" wx:key="index">
  10. <view class="recommended-box" bindtap="storepackage" data-item="{{item}}">
  11. <image class="recommended-image" src="{{item.cover}}" />
  12. <view class="recommended-name">{{item.storeName}}</view>
  13. <view class="recommended-score">
  14. <view class="score" style="color: {{activeColor}};">{{item.score}}分</view>
  15. <!-- <view class="sale">月售327</view> -->
  16. <view class="price" style="color: {{activeColor}};">¥{{item.perCapita}}/人</view>
  17. </view>
  18. <view class="recommended-score">
  19. <view class="recommended-address">{{item.storeAddress}}</view>
  20. </view>
  21. <view class="recommended-distance">距离{{item.distance}}km</view>
  22. </view>
  23. </block>
  24. </view>
  25. </scroll-view>
  26. </van-tab>
  27. <van-tab title="评分">
  28. <scroll-view style="height:calc(100vh - {{stickytop+ 148}}px);" scroll-y="{{true}}">
  29. <view class="box">
  30. <block wx:for="{{list}}" wx:key="index">
  31. <view class="recommended-box" data-item="{{item}}" bindtap="storepackage">
  32. <image class="recommended-image" src="{{item.image[0]}}" />
  33. <view class="recommended-name">{{item.storeName}}</view>
  34. <view class="recommended-score">
  35. <view class="score" style="color: {{activeColor}};">{{item.score}}分</view>
  36. <!-- <view class="sale">月售327</view> -->
  37. <view class="price" style="color: {{activeColor}};">¥{{item.perCapita}}/人</view>
  38. </view>
  39. <view class="recommended-score">
  40. <view class="recommended-address">{{item.storeAddress}}</view>
  41. <!-- <view class="recommended-distance">距离{{item.distance}}km</view> -->
  42. </view>
  43. <view class="recommended-distance">距离{{item.distance}}km</view>
  44. </view>
  45. </block>
  46. </view>
  47. </scroll-view>
  48. </van-tab>
  49. <van-tab title="距离">
  50. <scroll-view style="height:calc(100vh - {{stickytop+ 148}}px);" scroll-y="{{true}}">
  51. <view class="box">
  52. <block wx:for="{{list}}" wx:key="index">
  53. <view class="recommended-box" data-item="{{item}}" bindtap="storepackage">
  54. <image class="recommended-image" src="{{item.image[0]}}" />
  55. <view class="recommended-name">{{item.storeName}}</view>
  56. <view class="recommended-score">
  57. <view class="score" style="color: {{activeColor}};">{{item.score}}分</view>
  58. <!-- <view class="sale">月售327</view> -->
  59. <view class="price" style="color: {{activeColor}};">¥{{item.perCapita}}/人</view>
  60. </view>
  61. <view class="recommended-score">
  62. <view class="recommended-address">{{item.storeAddress}}</view>
  63. </view>
  64. <view class="recommended-distance">距离{{item.distance}}km</view>
  65. </view>
  66. </block>
  67. </view>
  68. </scroll-view>
  69. </van-tab>
  70. <van-tab title="价格">
  71. <scroll-view style="height:calc(100vh - {{stickytop+ 148}}px);" scroll-y="{{true}}">
  72. <view class="box">
  73. <block wx:for="{{list}}" wx:key="index">
  74. <view class="recommended-box" data-item="{{item}}" bindtap="storepackage">
  75. <image class="recommended-image" src="{{item.image[0]}}" />
  76. <view class="recommended-name">{{item.storeName}}</view>
  77. <view class="recommended-score">
  78. <view class="score" style="color: {{activeColor}};">{{item.score}}分</view>
  79. <!-- <view class="sale">月售327</view> -->
  80. <view class="price" style="color: {{activeColor}};">¥{{item.perCapita}}/人</view>
  81. </view>
  82. <view class="recommended-score">
  83. <view class="recommended-address">{{item.storeAddress}}</view>
  84. <!-- <view class="recommended-distance">距离{{item.distance}}km</view> -->
  85. </view>
  86. <view class="recommended-distance">距离{{item.distance}}km</view>
  87. </view>
  88. </block>
  89. </view>
  90. </scroll-view>
  91. </van-tab>
  92. </van-tabs>
  93. <!-- <block wx:for="{{list}}" wx:key="index">
  94. <view class="store" bindtap="storepackage">
  95. <view class="stores">
  96. <image class="store-image" src="{{item.image[0]}}" />
  97. <view class="store-box">
  98. <view class="box-name">{{item.storeName}}</view>
  99. <view class="price">¥{{item.perCapita}}/人</view>
  100. <view class="address">{{item.storeAddress}}</view>
  101. </view>
  102. </view>
  103. <view class="box-evaluation">
  104. <view class="store-evaluation">
  105. <van-rate readonly value="{{ item.score }}" allow-half void-icon="star" size="{{ 15 }}" void-color="#eee" color="#ffd21e" />
  106. <view class="evaluation">{{item.score}}</view>
  107. </view>
  108. <view class="sold">季售 {{item.sold?item.sold:'0'}}</view>
  109. </view>
  110. </view>
  111. </block> -->