<view class="main">
  <view wx:if="{{hasList}}">
    <view class="cart-box">
      <view class="cart-list" wx:for="{{carts}}" wx:key="{{index}}">
        <icon wx:if="{{item.selected}}" type="success" color="red" data-index="{{index}}" class="cart-pro-select" bindtap="selectList" />
        <icon wx:else type="circle" class="cart-pro-select" data-index="{{index}}" bindtap="selectList" />
        <navigator url="../details/details?id={{item.id}}">
          <image class="cart-thumb" src="{{item.image}}"></image>
        </navigator>
        <text class="cart-pro-name">{{item.title}}</text>
        <text class="cart-pro-price">￥{{item.price}}</text>
        <view class="cart-count-box">
          <text class="cart-count-down" bindtap="minusCount" data-obj="{{obj}}" data-index="{{index}}">-</text>
          <text class="cart-count-num">{{item.num}}</text>
          <text class="cart-count-add" bindtap="addCount" data-index="{{index}}">+</text>
        </view>
        <text class="cart-del" bindtap="deleteList" data-index="{{index}}">×</text>
      </view>
    </view>

    <view class="cart-footer">
      <icon wx:if="{{selectAllStatus}}" type="success_circle" color="#fff" class="total-select" bindtap="selectAll" />
      <icon wx:else type="circle" color="#fff" class="total-select" bindtap="selectAll" />
      <view class="order-icon">
        <navigator url="../orders/orders">
          <image src="/image/icon3.png"></image>
        </navigator>
      </view>
      <text>全选</text>
      <text class="cart-toatl-price">￥{{totalPrice}}</text>
    </view>
  </view>
  <view wx:else>
    <view class="cart-no-data">购物车是空的哦~</view>
  </view>
</view>