list.wxml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <include src="/commons/navbar/navbar" />
  2. <view class="after-navber">
  3. <view class="top-bar">
  4. <view wx:if="{{false}}">
  5. <view class="cat-list">
  6. <scroll-view scroll-x="true">
  7. <view class="list-content">
  8. <view class="cat-item" bindtap="allClick">
  9. <text class="flex-y-center">全部</text>
  10. </view>
  11. <view class="cat-item {{item.checked?'active':''}}" wx:for="{{cat_list}}" bindtap="catClick" data-index="{{index}}">
  12. <text class="flex-y-center">{{item.name}}</text>
  13. </view>
  14. </view>
  15. </scroll-view>
  16. </view>
  17. <view class="sub-cat-list" wx:for="{{cat_list}}" wx:for-index="parentIndex" wx:if="{{item.checked && item.list.length>0}}">
  18. <scroll-view scroll-x="true">
  19. <view class="list-content">
  20. <view class="cat-item {{item.checked?'active':''}}" wx:for="{{item.list}}" bindtap="subCatClick" data-parent-index="{{parentIndex}}" data-index="{{index}}">
  21. <text class="flex-y-center">{{item.name}}</text>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. </view>
  27. <view class="flex-row sort-bar">
  28. <view bindtap="sortClick" data-sort="0" class="flex-grow-1 flex-x-center flex-y-center sort-item {{sort==0 ? 'active':''}}">综合
  29. </view>
  30. <view bindtap="sortClick" data-sort="1" class="flex-grow-1 flex-x-center flex-y-center sort-item {{sort==1 ? 'active':''}}">最新
  31. </view>
  32. <view bindtap="sortClick" data-sort="2" data-default_sort_type="0" class="flex-grow-1 flex-x-center flex-row sort-item {{sort==2 ? 'active':''}}">
  33. <view class="flex-y-center">价格</view>
  34. <view class="flex-y-center sort-icon-box">
  35. <view>
  36. <view>
  37. <image wx:if="{{sort==2 && sort_type==0}}" class="sort-icon-up" src="/images/icon-sort-up-active.png"></image>
  38. <image wx:else="{{sort==2 && sort_type==0}}" class="sort-icon-up" src="/images/icon-sort-up.png"></image>
  39. </view>
  40. <view>
  41. <image wx:if="{{sort==2 && sort_type==1}}" class="sort-icon-up" src="/images/icon-sort-down-active.png"></image>
  42. <image wx:else="{{sort==2 && sort_type==1}}" class="sort-icon-up" src="/images/icon-sort-down.png"></image>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. <view bindtap="sortClick" data-sort="3" class="flex-grow-1 flex-x-center flex-y-center sort-item {{sort==3 ? 'active':''}}">销量
  48. </view>
  49. </view>
  50. </view>
  51. <view class="goods-list">
  52. <view wx:if="{{show_no_data_tip}}" class="no-data-tip">该类目暂无内容</view>
  53. <navigator url="/pages/goods/goods?id={{item.id}}" open-type="navigate" wx:for="{{goods_list}}" class="goods-item {{ index %2 == 0 ? 'goods-item_odd' : '' }}" style='font-size:11pt;'>
  54. <image class="goods-pic" src="{{item.pic_url}}" mode="aspectFill" />
  55. <view class="goods-info" style='padding:5rpx 20rpx;'>
  56. <text class="mb-10 text-more-2 text-more-1">{{item.name}}</text>
  57. <text class="goods-price">¥{{item.price}}</text>
  58. <!-- <view class='flex-row'>
  59. <view class='flex-grow-1' style='color:#ff334b'>¥{{item.price}}</view>
  60. <view class='flex-grow-0 fs-sm' style='color:#999;'>已售{{item.sales}}</view>
  61. </view> -->
  62. </view>
  63. </navigator>
  64. </view>
  65. <view class="loading-bar {{show_loading_bar?'active':''}}" style="text-align: center">
  66. <image style="width: 160rpx;height: 80rpx" src="/images/loading.svg"></image>
  67. </view>
  68. </view>