home.wxml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <view class="home-wrapper">
  2. <view class="app_page-header-search" wx:if="{{false}}">
  3. <view class="app_page-header-search-warp app_width-690">
  4. <label for="header-search">
  5. <image src="../../image/common/search@2x.png"></image>
  6. </label>
  7. <input
  8. placeholder-class="app_header-search-placeholder"
  9. value="{{searchForm.key_words}}"
  10. placeholder="搜索"
  11. data-formkey="key_words"
  12. bind:input="handleKeyWords"></input>
  13. </view>
  14. <view class="leaving-a-message" bind:tap="jumpLeavingAMessage" wx:if="{{false}}">
  15. <image src="../../image/common/message@2x.png"></image>
  16. <view>8</view>
  17. </view>
  18. </view>
  19. <!-- 轮播 -->
  20. <view
  21. class="page-section"
  22. wx:if="{{!!lunbos.length}}">
  23. <swiper
  24. indicator-dots="{{lunbos.length > 1}}"
  25. indicator-color="rgba(151, 209, 79, 1)"
  26. indicator-active-color="#FFF"
  27. autoplay="{{false}}">
  28. <block wx:for="{{lunbos}}" wx:key="lunbo_img_url">
  29. <swiper-item
  30. data-item="{{item}}"
  31. bind:tap="handleSwiperClick">
  32. <view class="swiper-item">
  33. <image src="{{item.lunbo_img_url}}"></image>
  34. </view>
  35. </swiper-item>
  36. </block>
  37. </swiper>
  38. </view>
  39. <!-- 消息通知 -->
  40. <view
  41. class="news-section"
  42. wx:if="{{lunboMsg.length > 0 && shop_status === 1}}">
  43. <image src="../../image/home/notice.png"></image>
  44. <swiper
  45. vertical="{{true}}"
  46. interval="{{2000}}"
  47. circular="{{true}}"
  48. autoplay="{{true}}">
  49. <block
  50. wx:for="{{lunboMsg}}"
  51. wx:key="index">
  52. <swiper-item
  53. data-item="{{item}}"
  54. bind:tap="jumpMessageDetail">
  55. <view class="swiper-item">{{item.msg_title}}</view>
  56. </swiper-item>
  57. </block>
  58. </swiper>
  59. </view>
  60. <!--顶部导航-->
  61. <view class="header-nav">
  62. <view
  63. class="nav"
  64. wx:for="{{headerNav}}"
  65. wx:key="index"
  66. data-item="{{item}}"
  67. bind:tap="handleSubscribeMessage">
  68. <image src="../../image/home/{{item.icon}}"></image>
  69. <text>{{item.name}}</text>
  70. </view>
  71. </view>
  72. <!-- 核心入口:最新上架、VR看农场、频道:村长说农货 -->
  73. <view class="marketing-wrap">
  74. <view>
  75. <image
  76. class="new-goods"
  77. src="../../image/home/new_goods.png"
  78. data-page="newGoods"
  79. bind:tap="openMarketing"></image>
  80. <image
  81. class="vr"
  82. data-page="VR"
  83. src="../../image/home/vr.png"
  84. bind:tap="openMarketing"></image>
  85. </view>
  86. <image
  87. class="media"
  88. data-page="media"
  89. src="../../image/home/media.png"
  90. bind:tap="openMarketing"></image>
  91. </view>
  92. <view class="excellent-goods-title">优秀产品</view>
  93. <van-tabs
  94. active="{{ searchForm.category_id }}"
  95. color="transparent"
  96. title-active-color="#FFFFFF"
  97. title-inactive-color="#858597"
  98. tab-class="my-tab-class"
  99. tab-active-class="my-tab-active-class"
  100. bind:click="handleTab">
  101. <van-tab
  102. title="{{item.category_name}}"
  103. wx:for="{{categoryList}}"
  104. wx:key="id"
  105. name="{{item.id}}">
  106. </van-tab>
  107. </van-tabs>
  108. <!--瀑布流-->
  109. <view class="waterfall">
  110. <view class="waterfall-left">
  111. <block wx:for="{{leftList}}" wx:key="id">
  112. <goods-item-large item="{{item}}"/>
  113. </block>
  114. </view>
  115. <view class="waterfall-right">
  116. <block wx:for="{{rightList}}" wx:key="id">
  117. <goods-item-large item="{{item}}"/>
  118. </block>
  119. </view>
  120. </view>
  121. <!-- 无数据 -->
  122. <view class="list-bitmap" wx:if="{{finished && listData.length < 1}}">
  123. <image src="../../image/common/bitmap.png"></image>
  124. <text>暂无数据</text>
  125. </view>
  126. <view class="pullup-wrapper" wx:if="{{!isRefresh}}">
  127. <van-loading
  128. wx:if="{{!finished}}"
  129. size="24px"
  130. type="spinner">加载中...
  131. </van-loading>
  132. </view>
  133. </view>
  134. <!--自定义tabbar页面被遮挡-->
  135. <view style="padding-bottom:25%;"></view>