catalog.wxml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. <view class="container">
  2. <view class="search">
  3. <navigator url="/pages/search/search" class="input">
  4. <van-icon name="search"/>
  5. <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
  6. </navigator>
  7. </view>
  8. <view class="catalog">
  9. <scroll-view class="nav" scroll-y="true">
  10. <view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{categoryList}}" wx:key="id" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">{{item.name}}</view>
  11. </scroll-view>
  12. <scroll-view class="cate" scroll-y="true">
  13. <navigator url="url" class="banner">
  14. <image class="image" src="{{currentCategory.picUrl}}"></image>
  15. <view class="txt">{{currentCategory.frontName}}</view>
  16. </navigator>
  17. <view class="hd">
  18. <text class="line"></text>
  19. <text class="txt">{{currentCategory.name}}分类</text>
  20. <text class="line"></text>
  21. </view>
  22. <view class="bd">
  23. <navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:key="id" wx:for="{{currentSubCategoryList}}">
  24. <image class="icon" src="{{item.picUrl}}"></image>
  25. <text class="txt">{{item.name}}</text>
  26. </navigator>
  27. </view>
  28. </scroll-view>
  29. </view>
  30. </view>