index.wxml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. <!-- 分类页 -->
  2. <view class="container">
  3. <view class="search">
  4. <navigator url="/pages/search/search" class="input">
  5. <image class="icon"></image>
  6. <text class="txt">商品搜索,搜索关键字</text>
  7. </navigator>
  8. </view>
  9. <view class="catalog">
  10. <scroll-view class="nav" scroll-y="true">
  11. <view class="item {{ currentCategoryId == item.id ? 'active' : ''}}" wx:for="{{navList}}" data-id="{{item.id}}" data-name="{{item.name}}" data-index="{{index}}" bindtap="switchCate" wx:key="{{item.id}}">{{item.name}}</view>
  12. </scroll-view>
  13. <scroll-view class="cate" scroll-y="true">
  14. <view class="banner">
  15. <image class="image" src="https://image.flaticon.com/icons/svg/743/743007.svg"></image>
  16. </view>
  17. <view class="hd">
  18. <text class="line"></text>
  19. <text class="txt">{{currentCategoryName}}分类</text>
  20. <text class="line"></text>
  21. </view>
  22. <view class="bd">
  23. <navigator url="/pages/category/list/list?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{currentCategory}}" wx:key="{{item.id}}">
  24. <image class="icon" src="{{item.iconUrl}}"></image>
  25. <text class="txt">{{item.name}}</text>
  26. </navigator>
  27. </view>
  28. </scroll-view>
  29. </view>
  30. </view>