shopCart.wxml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <import src="../components/template/loadAnimation/loadAnimation.wxml" />
  2. <template is="shopcartLoad" wx:if="{{loadAnimation}}" />
  3. <view style='background:#fff;' wx:if="{{summary.length <= 0}}">
  4. <view class='flex_center'>
  5. <image style='width:200rpx;' mode='widthFix' src='../../image/empty_cart.png'></image>
  6. </view>
  7. <view class='flex_center'>
  8. <text style='font-size:26rpx;color:#a1a1a1;'>您的购物车没有商品哦!</text>
  9. </view>
  10. <view class='flex_center'>
  11. <button size='mini' bindtap='skip_index' style='margin:20rpx 0;background: #2b2b2b;' type='warn'>去逛逛</button>
  12. </view>
  13. </view>
  14. <view class='cart_list'>
  15. <block wx:for="{{cart_list}}" wx:for-index="cart_index" wx:key="cart_index">
  16. <!-- 套餐情况下循环 -->
  17. <block wx:if="{{item['bl_id'] > 0}}">
  18. <view class="mb20">
  19. <view class="bundl_title"><text class="bundle_tip">搭配套装</text> {{item['bl_name']}}</view>
  20. <view class='cart_item'>
  21. <icon class='cancal_btn' type="cancel" size="22" color="#333" bindtap='cancal_cart' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"></icon>
  22. <view class='check_btn' data-goodsid="{{item['goods_id']}}" bindtap='goods_checked' data-cartid="{{item['cart_id']}}">
  23. <block wx:if="{{item['checked']}}">
  24. <icon type="success" size="21" color="#333"></icon>
  25. </block>
  26. <block wx:else>
  27. <view class="icon_empty"></view>
  28. </block>
  29. </view>
  30. <view>
  31. <view class="align_center mb20" wx:for="{{item['goods']}}" wx:for-index="bl_index" wx:for-item="bl_item" wx:key="bl_index">
  32. <view class='goods_image' catchtap="toDetails" data-goodsid="{{bl_item['goods_id']}}">
  33. <image mode='scaleToFill' src="{{bl_item['goods_summary']['goods_image_url']}}"></image>
  34. </view>
  35. <view class='goods_content' catchtap="toDetails" data-goodsid="{{bl_item['goods_id']}}">
  36. <view class='goods_name one_line_hidden'>{{bl_item['goods_summary']['goods_mobile_name']}}</view>
  37. <view class='goods_spec one_line_hidden'>{{bl_item['goods_summary']['goods_spec']}}</view>
  38. <view class='goods_price'>
  39. <text class="bonus_price"><text class="f24">¥</text>{{bl_item['bl_goods_price']}}</text>
  40. <text class="original_price line-through ml10">天猫价{{bl_item['goods_summary']['goods_price']}}</text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class='num_handle align_center'>
  46. <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"
  47. data-function='minus' data-num="{{item['goods_num']}}">-</text>
  48. <block>
  49. <text class='num'>{{item['goods_num']}}</text>
  50. </block>
  51. <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"
  52. data-function='add' data-num="{{item['goods_num']}}">+</text>
  53. </view>
  54. </view>
  55. <view class="bundle_price"><text>套装价:</text><text class="ft_bold col333">¥{{item['bl_price']}}</text> <text class="line-through col666 ml10 f20">天猫价{{item['totalPrice']}}</text></view>
  56. </view>
  57. </block>
  58. <!-- 非套餐情况下循环 -->
  59. <block wx:if="{{item['bl_id'] == 0}}">
  60. <view class='cart_item mb20'>
  61. <icon class='cancal_btn' type="cancel" size="22" color="#333" bindtap='cancal_cart' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"></icon>
  62. <view class='check_btn' data-goodsid="{{item['goods_id']}}" bindtap='goods_checked' data-cartid="{{item['cart_id']}}">
  63. <block wx:if="{{item['checked']}}">
  64. <icon type="success" size="21" color="#333"></icon>
  65. </block>
  66. <block wx:else>
  67. <view class="icon_empty"></view>
  68. </block>
  69. </view>
  70. <view class='goods_image' catchtap="toDetails" data-goodsid="{{item['goods_id']}}">
  71. <image mode='scaleToFill' src="{{item['goods_summary']['goods_image_url']}}"></image>
  72. </view>
  73. <view class='goods_content' catchtap="toDetails" data-goodsid="{{item['goods_id']}}">
  74. <view class='goods_name one_line_hidden'>{{item['goods_summary']['goods_mobile_name']}}</view>
  75. <view class='goods_spec one_line_hidden'>{{item['goods_summary']['goods_spec']}}</view>
  76. <view class='goods_price'>
  77. <text class="bonus_price" wx:if="{{item['goods_summary']['act_type'] == 0}}"><text class="f24">¥</text>{{item['goods_summary']['bonus_price']}}</text>
  78. <text class="bonus_price" wx:if="{{item['goods_summary']['act_type'] == 2}}"><text class="f24">¥</text>{{item['goods_summary']['goods_promotion_price']}}</text>
  79. <text class="original_price line-through ml10">天猫价{{item['goods_summary']['goods_price']}}</text>
  80. </view>
  81. </view>
  82. <view class='num_handle default_num_handle'>
  83. <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"
  84. data-function='minus' data-num="{{item['goods_num']}}">-</text>
  85. <block>
  86. <text class='num'>{{item['goods_num']}}</text>
  87. </block>
  88. <text class='handle_btn' bindtap='goods_num_handle' data-goodsid="{{item['goods_id']}}" data-cartid="{{item['cart_id']}}"
  89. data-function='add' data-num="{{item['goods_num']}}">+</text>
  90. </view>
  91. </view>
  92. </block>
  93. </block>
  94. </view>
  95. <!-- 猜你喜欢 -->
  96. <block wx:if="{{canShow}}">
  97. <view wx:if="{{prop_special.length}}" class="mt30 mb10">
  98. <view class="text_center l_height42 f30 col333">-猜你喜欢-</view>
  99. <blockList prop_special="{{prop_special}}" summery="{{summery}}" special_datas="{{special_datas}}"> </blockList>
  100. </view>
  101. </block>
  102. <view class='clear_fixed'></view>
  103. <view class="handle_fixed">
  104. <view class="all_check_btn" bindtap='all_checked'>
  105. <block wx:if="{{all_checked}}">
  106. <icon type="success" size="21" color="#333" style='margin-right:22rpx;position:relative;top:7rpx;'></icon>
  107. </block>
  108. <block wx:else>
  109. <view class="icon_empty" style='position:relative;bottom:5rpx;'></view>
  110. </block>
  111. <text>全选</text>
  112. </view>
  113. <view style='float:right'>
  114. <view class='cope'>
  115. <text class='bonus_price'>应付:¥{{allPrice}}</text>
  116. <text class="original_price line-through ml10 mr10">¥{{allGoodsPrice}}</text>
  117. </view>
  118. <view class='settlement_btn' bindtap='settlement'>
  119. <text>结算</text>
  120. </view>
  121. </view>
  122. </view>