cart.wxml 1.8 KB

1234567891011121314151617181920212223242526272829303132
  1. <view class="main">
  2. <view wx:if="{{hasList}}">
  3. <view class="cart-box">
  4. <view class="cart-list" wx:for="{{carts}}" wx:key="{{index}}">
  5. <icon wx:if="{{item.selected}}" type="success" color="red" data-index="{{index}}" class="cart-pro-select" bindtap="selectList"/>
  6. <icon wx:else type="circle" class="cart-pro-select" data-index="{{index}}" bindtap="selectList"/>
  7. <navigator url="../details/details?id={{item.id}}"><image class="cart-thumb" src="{{item.image}}"></image></navigator>
  8. <text class="cart-pro-name">{{item.title}}</text>
  9. <text class="cart-pro-price">¥{{item.price}}</text>
  10. <view class="cart-count-box">
  11. <text class="cart-count-down" bindtap="minusCount" data-obj="{{obj}}" data-index="{{index}}">-</text>
  12. <text class="cart-count-num">{{item.num}}</text>
  13. <text class="cart-count-add" bindtap="addCount" data-index="{{index}}">+</text>
  14. </view>
  15. <text class="cart-del" bindtap="deleteList" data-index="{{index}}">×</text>
  16. </view>
  17. </view>
  18. <view class="cart-footer">
  19. <icon wx:if="{{selectAllStatus}}" type="success_circle" color="#fff" class="total-select" bindtap="selectAll"/>
  20. <icon wx:else type="circle" color="#fff" class="total-select" bindtap="selectAll"/>
  21. <view class="order-icon">
  22. <navigator url="../orders/orders"><image src="/image/icon3.png"></image></navigator>
  23. </view>
  24. <text>全选</text>
  25. <text class="cart-toatl-price">¥{{totalPrice}}</text>
  26. </view>
  27. </view>
  28. <view wx:else>
  29. <view class="cart-no-data">购物车是空的哦~</view>
  30. </view>
  31. </view>