newGoods.wxml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <view class="container">
  2. <view class="brand-info">
  3. <view class="name">
  4. <image class="img" src="{{bannerInfo.imgUrl}}" 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 {{currentSortType == 'price' ? 'active' : ''}}" bindtap="openSortFilter" id="priceSort">
  19. <text class="txt">价格</text>
  20. <van-icon name="arrow-up" wx:if="{{ currentSortType == 'price' && currentSortOrder == 'asc' }}" />
  21. <van-icon name="arrow-down" wx:elif="{{ currentSortType == 'price' && currentSortOrder == 'desc'}}" />
  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="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="id">
  34. <navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
  35. <image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
  36. <text class="name">{{iitem.name}}</text>
  37. <text class="price">¥{{iitem.retailPrice}}</text>
  38. </navigator>
  39. </block>
  40. </view>
  41. </view>
  42. </view>