hotGoods.wxml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <view class="container">
  2. <view class="brand-info">
  3. <view class="name">
  4. <image class="img" src="{{bannerInfo.imgUrl}}" mode="widthFix"></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="/pages/goods/goods?id={{iitem.id}}">
  35. <image class="img" src="{{iitem.picUrl}}" background-size="cover"></image>
  36. <!-- <text class="name">{{iitem.name}}</text> -->
  37. <view style="display: flex;margin-top: 10rpx;height: 71rpx;">
  38. <!-- <image wx:if="{{iitem.activited}}"
  39. src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/618.png"
  40. style="width: 39px;height:16px;margin-right: 2px;" /> -->
  41. <text class="name">{{iitem.name}}</text>
  42. </view>
  43. <view class="price">
  44. <!-- <view class="retailPrice">¥{{iitem.retailPrice}}</view>
  45. <view class="memberPrice">¥{{iitem.memberPrice}}</view>
  46. <view class="member-price-tag">会员价</view> -->
  47. <view wx:if="{{iitem.activited}}" class="retailPrice">
  48. <text class="price-unit">¥</text>{{iitem.activityPrice}}</view>
  49. <view wx:else="" class="retailPrice"><text class="price-unit">¥</text>{{iitem.retailPrice}}</view>
  50. <view wx:if="{{iitem.activited||iitem.counterPrice!=iitem.retailPrice}}" class="counterPrice">原价¥{{iitem.counterPrice}}</view>
  51. </view>
  52. <!-- <view class="price"><text>¥{{iitem.retailPrice}}</text>
  53. <text class="counterPrice sub-color">¥{{iitem.counterPrice}}</text>
  54. </view> -->
  55. </navigator>
  56. </block>
  57. </view>
  58. </view>
  59. </view>