sub-category.wxml 1.1 KB

1234567891011121314151617181920212223
  1. <!--pages/sub-category/sub-category.wxml-->
  2. <view class="container">
  3. <!-- 顶部子分类tab -->
  4. <scroll-view wx:if="{{subCategoryList.length>0}}" scroll-x="true" class="category-tit" scroll-into-view="{{intoView}}" scroll-with-animation="{{true}}">
  5. <block wx:for="{{subCategoryList}}" wx:key="categoryId">
  6. <view class="category-item {{item.categoryId==categoryId? 'on':''}}" bindtap='onSubCategoryTap' id="{{'sw' + item.categoryId}}" data-id="{{item.categoryId}}">{{item.categoryName}}</view>
  7. </block>
  8. </scroll-view>
  9. <!-- 商品列表 -->
  10. <view class="prod-item" wx:if="{{prodList.length}}" >
  11. <block wx:for="{{prodList}}" wx:key="prodId">
  12. <prod item="{{item}}"></prod>
  13. </block>
  14. </view>
  15. <!-- 空 || 加载完毕 -->
  16. <view class="empty {{current==pages? 'all': ''}}" wx:if="{{prodList.length==0 || current==pages}}">
  17. <view class="empty-icon" wx:if="{{prodList.length==0}}">
  18. <image src="../../images/icon/empty.png"></image>
  19. </view>
  20. <view class="empty-text">{{prodList.length==0? '此分类下暂无商品':'已经到底啦~'}}</view>
  21. </view>
  22. </view>