home.wxml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. class="nav"
  71. data-item="{{objNews}}"
  72. bind:tap="handleSubscribeMessage"
  73. wx:if="{{hasNewsTab}}">
  74. <image src="../../image/home/{{objNews.icon}}"></image>
  75. <text>{{objNews.name}}</text>
  76. </view>
  77. </view>
  78. <!-- 核心入口:最新上架、VR看菜园、频道:村长说农货 -->
  79. <view class="marketing-wrap">
  80. <view>
  81. <image
  82. class="new-goods"
  83. src="../../image/home/new_goods.png"
  84. data-page="newGoods"
  85. bind:tap="openMarketing"></image>
  86. <image
  87. class="vr"
  88. data-page="VR"
  89. src="../../image/home/vr.png"
  90. bind:tap="openMarketing"></image>
  91. </view>
  92. <image
  93. class="media"
  94. data-page="media"
  95. src="../../image/home/media.png"
  96. bind:tap="openMarketing"></image>
  97. </view>
  98. <view class="excellent-goods-title">优秀产品</view>
  99. <van-tabs
  100. active="{{ searchForm.category_id }}"
  101. color="transparent"
  102. title-active-color="#FFFFFF"
  103. title-inactive-color="#858597"
  104. tab-class="my-tab-class"
  105. tab-active-class="my-tab-active-class"
  106. bind:click="handleTab">
  107. <van-tab
  108. title="{{item.category_name}}"
  109. wx:for="{{categoryList}}"
  110. wx:key="id"
  111. name="{{item.id}}">
  112. </van-tab>
  113. </van-tabs>
  114. <!--瀑布流-->
  115. <view class="waterfall">
  116. <view class="waterfall-left">
  117. <block wx:for="{{leftList}}" wx:key="id">
  118. <goods-item-large item="{{item}}"/>
  119. </block>
  120. </view>
  121. <view class="waterfall-right">
  122. <block wx:for="{{rightList}}" wx:key="id">
  123. <goods-item-large item="{{item}}"/>
  124. </block>
  125. </view>
  126. </view>
  127. <!-- 无数据 -->
  128. <view class="list-bitmap" wx:if="{{finished && listData.length < 1}}">
  129. <image src="../../image/common/bitmap.png"></image>
  130. <text>暂无数据</text>
  131. </view>
  132. <view class="pullup-wrapper" wx:if="{{!isRefresh}}">
  133. <van-loading
  134. wx:if="{{!finished}}"
  135. size="24px"
  136. type="spinner">加载中...
  137. </van-loading>
  138. </view>
  139. </view>
  140. <!--自定义tabbar页面被遮挡-->
  141. <view style="padding-bottom:25%;"></view>