<!--components/tabbar/tabbar.wxml-->
<view class="tabbar">
 
  <view class="tabbar-item pic-item" wx:if="{{active == 0}}">
    <image class="icon" wx:if="{{isScroll}}" bind:tap="backToTop" src="../../images/tabbar/scroll_home.png" mode=""/>
    <image class="icon" wx:else src="../../images/tabbar/select_home.png" mode=""/>
  </view>
  <view class="tabbar-item" data-url="/pages/index/index" bind:tap="handleTab"  wx:else>
    <image class="icon" src="../../images/tabbar/home.png" mode=""/>
    <view class="name">首页</view>
  </view>
   
  <view class="tabbar-item {{active == 1?'active':''}}"  data-url="/pages/category/category" bind:tap="handleTab">
    <image class="icon" src="{{active == 1?'../../images/tabbar/select_sort.png':'../../images/tabbar/sort.png'}}" mode=""/>
    <view class="name">分类</view>
  </view>
  <view class="tabbar-item {{active == 2?'active':''}}"  data-url="/pages/basket/basket" bind:tap="handleTab">
    <view class="num" wx:if="{{num}}">{{num}}</view>
    <image class="icon" src="{{active == 2?'../../images/tabbar/select_shop_car.png':'../../images/tabbar/shop_car.png'}}" mode=""/>
    <view class="name">购物车</view>
  </view>
  <view class="tabbar-item {{active == 3?'active':''}}" data-url="/pages/user/user" bind:tap="handleTab">
    <image class="icon" src="{{active == 3?'../../images/tabbar/select_mine.png':'../../images/tabbar/mine.png'}}" mode=""/>
    <view class="name">我的</view>
  </view>
  
</view>