<view class="container">
  <view class="search">
    <navigator url="/pages/search/search" class="input">
      <image class="icon"></image>
      <text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
    </navigator>
  </view>
  <view class="catalog">
    <scroll-view class="nav" scroll-y="true">
        <view class="item {{ currentCategory.id == item.id ? 'active' : ''}}" wx:for="{{navList}}"  data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">{{item.name}}</view>
    </scroll-view>
    <scroll-view class="cate" scroll-y="true">
        <navigator url="url" class="banner">
            <image class="image" src="{{currentCategory.wap_banner_url}}"></image>
            <view class="txt">{{currentCategory.front_name}}</view>
        </navigator>
        <view class="hd">
            <text class="line"></text>
            <text class="txt">{{currentCategory.name}}分类</text>
            <text class="line"></text>
        </view>
        <view class="bd">
            <navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{currentCategory.subCategoryList}}">
                <image class="icon" src="{{item.wap_banner_url}}"></image>
                <text class="txt">{{item.name}}</text>
            </navigator>
        </view>
    </scroll-view>
  </view>
</view>