index.wxml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!--index.wxml-->
  2. <view class="container {{contentShow}}" >
  3. <!-- <view bindtouchmove="touchM" scroll-top="{{scrollTop}}" class="container"> -->
  4. <view class="main">
  5. <view wx:if="{{hasList}}" >
  6. <view class="cart-box">
  7. <view class="cart-list" wx:for="{{carts}}" wx:key="{{index}}">
  8. <block wx:if="{{item.commodity_flag == 0 && item.canBuy && item.num >= item.limitNum}}">
  9. <view class="cart-list-wrap" bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{index}}" style="left:{{touchDel == index ? txtStyle : '0'}}">
  10. <view class='cart_flag_wrap' bindtap="selectList" data-comid="{{item.com_id}}" data-num="{{item.num}}" data-index="{{index}}" data-repertory="{{item.com_group_id}}">
  11. <!-- wx:if 是否选择显示不同图标 flag : 1 选中 -->
  12. <image wx:if="{{item.flag == 1}}" class="cart-pro-select" src='/images/cart_choose_pre.png'></image>
  13. <image wx:else class="cart-pro-select" src='/images/cart_choose_n.png'></image>
  14. </view>
  15. <!-- 跳转到商品详情 -->
  16. <view bindtap='buyUrl' data-comid="{{item.com_id}}" class="cart-thumb">
  17. <image src="{{item.logo}}"></image>
  18. </view>
  19. <view class="cart-pro-name">{{item.name}}</view>
  20. <view class="cart-pro-infor">
  21. <text wx:if="{{item.style1_name}}">{{item.style1_name}} </text>
  22. <text wx:if="{{item.style2_name}}">{{item.style2_name}} </text>
  23. <text wx:if="{{item.style3_name}}">{{item.style3_name}} </text>
  24. <text wx:if="{{item.style4_name}}">{{item.style4_name}} </text>
  25. <text wx:if="{{item.style5_name}}">{{item.style5_name}} </text>
  26. <text wx:if="{{item.giftbox_name}}">{{item.giftbox_name}} </text>
  27. <text wx:if="{{item.process_name}}">{{item.process_name}}</text>
  28. </view>
  29. <view class="cart-pro-price">¥<text>{{loginStatic && item.product_channel_price ? item.product_channel_price : item.new_price}}</text></view>
  30. <!-- 增加减少数量按钮 -->
  31. <view class="cart-count-box">
  32. <image class="cart-count-down" data-inventory="{{item.inventory}}" bindtap="minusCount" data-index="{{index}}" src="{{item.num>item.limitNum?'../../images/minus_pre.png':'../../images/minus.png'}}"></image>
  33. <text class="cart-count-num">{{item.num}}</text>
  34. <image class="cart-count-add" bindtap="addCount" data-index="{{index}}" src="{{item.repertory > item.num ? '../../images/add_pre.png' : '../../images/add.png'}}"></image>
  35. </view>
  36. <!-- <text class="cart-del" bindtap="deleteList" data-index="{{index}}">×</text> -->
  37. </view>
  38. <view data-index="{{index}}" data-id="{{item.id}}" data-flag="{{item.commodity_flag}}" catchtap = "delItem" class="inner del">删除</view>
  39. </block>
  40. </view>
  41. </view>
  42. <!-- 底部操作栏 -->
  43. <view class="cart-footer">
  44. <view class="cart-footer-cont">
  45. <image wx:if="{{selectAllStatus}}" class="total-select" bindtap="selectAll" src='/images/cart_choose_pre.png'></image>
  46. <image wx:else class="total-select" bindtap="selectAll" src='/images/cart_choose_n.png'></image>
  47. <text class="buy-btn" bindtap="{{firstClick == 0 ? 'tz' : ''}}">立即采购</text>
  48. <view class="cart-toatl-price">
  49. <text class="price_title">合计:</text>
  50. <text class="price_yuan">¥ </text>
  51. <text class="price_money"> {{totalPrice}}</text>
  52. </view>
  53. <view class="cart-footer-title">全选</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view wx:else>
  58. <view class="cart-no-data">购物车是空的哦~</view>
  59. </view>
  60. </view>
  61. <!-- </view> -->
  62. </view>
  63. <!-- 失效宝贝 -->
  64. <block wx:if="{{shixiao_num > 0}}">
  65. <!-- <view wx:if="{{hasList}}" > -->
  66. <!-- 标题 -->
  67. <!-- <view class='like_title_wrap'>
  68. <view class='like_line'></view>
  69. <view class='like_title'>失效宝贝</view>
  70. </view> -->
  71. <view class="cart-box">
  72. <view class="cart-list shixiao_cart_list" wx:for="{{carts}}" wx:key="{{index}}">
  73. <!-- 失效 / 无库存 -->
  74. <block wx:if="{{item.commodity_flag != 0 || !item.canBuy || item.num < item.limitNum}}">
  75. <view class="cart-list-wrap" bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{index}}" style="left:{{touchDel == index ? txtStyle : '0'}}">
  76. <!-- 标识 -->
  77. <block wx:if="{{item.commodity_flag != 0 || item.num < item.limitNum}}">
  78. <view class="shixiao">失效</view>
  79. </block>
  80. <block wx:else>
  81. <view class="shixiao">售罄</view>
  82. </block>
  83. <!-- 跳转到商品详情 -->
  84. <view bindtap='buyUrl' data-comid="{{item.com_id}}" class="cart-thumb">
  85. <image src="{{item.logo}}"></image>
  86. </view>
  87. <view class="cart-pro-name shixiao_pro_name">{{item.name}}</view>
  88. <!-- 提示信息 -->
  89. <view class="shixiao_msg">
  90. <block wx:if="{{item.commodity_flag != 0}}">
  91. <view>该商品已下架</view>
  92. </block>
  93. <block wx:elif="{{item.num < item.limitNum}}">
  94. <view>请重新选择规格</view>
  95. </block>
  96. <block wx:else>
  97. <view>该商品已售罄</view>
  98. </block>
  99. </view>
  100. </view>
  101. <view data-index="{{index}}" data-id="{{item.id}}" data-flag="{{item.commodity_flag}}" catchtap = "delItem" class="inner del">删除</view>
  102. </block>
  103. </view>
  104. </view>
  105. <!-- </view> -->
  106. </block>
  107. <!-- 猜你喜欢 -->
  108. <!-- <view class='like_wrap {{contentShow}}' style="padding-bottom:{{paddingBottom}}rpx;">
  109. <view class='like_title_wrap'>
  110. <view class='like_line'></view>
  111. <view class='like_title'>猜你喜欢</view>
  112. </view>
  113. <view class='like_goods_list clearfix'>
  114. <block wx:for='{{likeList}}' wx:key='key' wx:for-index='i'>
  115. <navigator url='{{item.url}}' class='each_goods'>
  116. <view class='each_goods_img_wrap'>
  117. <image src='{{item.imgSrc}}' class='each_goods_img'></image>
  118. </view>
  119. <view class='each_goods_name'>{{item.name}}</view>
  120. <view class='each_goods_price'>¥{{item.newPrice}}<text decode='true'>¥{{item.oldPrice}}</text></view>
  121. </navigator>
  122. </block>
  123. </view>
  124. </view> -->
  125. <!-- 蒙层 -->
  126. <view class="modal_wrap {{hiddenmodal ? 'hidden' : ''}}">
  127. <view class="modal {{hiddenmodal ? 'hidden' : ''}}">{{modalCont}}</view>
  128. </view>
  129. <view wx:if="{{maskBg}}" class="modal_bg "></view>