hotGoods.wxml 1.8 KB

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