shopCart.wxml 7.0 KB

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