home.wxml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <view class="home-wrapper">
  2. <view class="app_page-header-search">
  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}}">
  43. <image src="../../image/home/notice.png"></image>
  44. <swiper
  45. vertical="{{true}}"
  46. interval="{{2000}}"
  47. circular="{{true}}"
  48. autoplay="{{true}}">
  49. <block wx:for="{{lunboMsg}}" wx:key="index">
  50. <swiper-item
  51. data-item="{{item}}"
  52. bind:tap="handleSwiperClick">
  53. <rich-text nodes="{{item.msg_content}}"></rich-text>
  54. </swiper-item>
  55. </block>
  56. </swiper>
  57. </view>
  58. <!--顶部导航-->
  59. <view class="header-nav">
  60. <view
  61. class="nav"
  62. wx:for="{{headerNav}}"
  63. wx:key="index"
  64. data-item="{{item}}"
  65. bind:tap="handleSubscribeMessage">
  66. <image src="../../image/home/{{item.icon}}"></image>
  67. <text>{{item.name}}</text>
  68. </view>
  69. </view>
  70. <!-- 核心入口:最新上架、VR看菜园、频道:村长说农货 -->
  71. <view class="marketing-wrap">
  72. <view>
  73. <image
  74. class="new-goods"
  75. src="../../image/home/new_goods.png"
  76. data-page="newGoods"
  77. bind:tap="openMarketing"></image>
  78. <image
  79. class="vr"
  80. data-page="VR"
  81. src="../../image/home/vr.png"
  82. bind:tap="openMarketing"></image>
  83. </view>
  84. <image
  85. class="media"
  86. data-page="media"
  87. src="../../image/home/media.png"
  88. bind:tap="openMarketing"></image>
  89. </view>
  90. <view class="excellent-goods-title">优秀产品</view>
  91. <van-tabs
  92. active="{{ searchForm.category_id }}"
  93. color="transparent"
  94. title-active-color="#FFFFFF"
  95. title-inactive-color="#858597"
  96. tab-class="my-tab-class"
  97. tab-active-class="my-tab-active-class"
  98. bind:click="handleTab">
  99. <van-tab
  100. title="{{item.category_name}}"
  101. wx:for="{{categoryList}}"
  102. wx:key="id"
  103. name="{{item.id}}">
  104. </van-tab>
  105. </van-tabs>
  106. <!--瀑布流-->
  107. <view class="waterfall">
  108. <view class="waterfall-left">
  109. <block wx:for="{{leftList}}" wx:key="id">
  110. <goods-item-large item="{{item}}"/>
  111. </block>
  112. </view>
  113. <view class="waterfall-right">
  114. <block wx:for="{{rightList}}" wx:key="id">
  115. <goods-item-large item="{{item}}"/>
  116. </block>
  117. </view>
  118. </view>
  119. <!-- 无数据 -->
  120. <view class="list-bitmap" wx:if="{{finished && listData.length < 1}}">
  121. <image src="../../image/common/bitmap.png"></image>
  122. <text>暂无数据</text>
  123. </view>
  124. <view class="pullup-wrapper" wx:if="{{!isRefresh}}">
  125. <van-loading
  126. wx:if="{{!finished}}"
  127. size="24px"
  128. type="spinner">加载中...
  129. </van-loading>
  130. </view>
  131. </view>
  132. <!--自定义tabbar页面被遮挡-->
  133. <view style="padding-bottom:25%;"></view>