hotGoods.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <view class="container">
  2. <view class="brand-info">
  3. <view class="name">
  4. <image class="img" src="{{bannerInfo.img_url}}" background-size="cover"></image>
  5. <view class="info-box">
  6. <view class="info">
  7. <text class="txt">{{bannerInfo.name}}</text>
  8. <text class="line"></text>
  9. </view>
  10. </view>
  11. </view>
  12. </view>
  13. <view class="sort">
  14. <view class="sort-box">
  15. <view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
  16. <text class="txt">综合</text>
  17. </view>
  18. <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc' ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
  19. <text class="txt">价格</text>
  20. </view>
  21. <view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
  22. <text class="txt">分类</text>
  23. </view>
  24. </view>
  25. <view class="sort-box-category" wx-if="{{categoryFilter}}">
  26. <view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="cate-{{item.id}}" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
  27. </view>
  28. </view>
  29. <view class="cate-item">
  30. <view class="b">
  31. <block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="unique">
  32. <navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
  33. <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
  34. <text class="name">{{iitem.name}}</text>
  35. <text class="price">¥{{iitem.retail_price}}</text>
  36. </navigator>
  37. </block>
  38. </view>
  39. </view>
  40. </view>