carInsert.wxml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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}}">
  11. <!-- wx:if 是否选择显示不同图标 -->
  12. <image wx:if="{{item.flag == 1}}" data-index="{{index}}" class="cart-pro-select" bindtap="selectList" src='/images/cart_choose_pre.png'></image>
  13. <image wx:else class="cart-pro-select" data-index="{{index}}" bindtap="selectList" 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>{{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></view>
  52. <view class="cart-footer-title">全选</view>
  53. </view>
  54. </view>
  55. </view>
  56. <view wx:else>
  57. <view class="cart-no-data">购物车是空的哦~</view>
  58. </view>
  59. </view>
  60. <!-- </view> -->
  61. </view>
  62. <!-- 失效宝贝 -->
  63. <block wx:if="{{shixiao_num > 0}}">
  64. <!-- <view wx:if="{{hasList}}" > -->
  65. <!-- 标题 -->
  66. <view class='like_title_wrap'>
  67. <view class='like_line'></view>
  68. <view class='like_title'>失效宝贝</view>
  69. </view>
  70. <view class="cart-box">
  71. <view class="cart-list shixiao_cart_list" wx:for="{{carts}}" wx:key="{{index}}">
  72. <!-- 失效 / 无库存 -->
  73. <block wx:if="{{item.commodity_flag != 0 || !item.canBuy || item.num < item.limitNum}}">
  74. <view class="cart-list-wrap" bindtouchstart="touchS" bindtouchmove="touchM" bindtouchend="touchE" data-index="{{index}}" style="left:{{touchDel == index ? txtStyle : '0'}}">
  75. <!-- 标识 -->
  76. <block wx:if="{{item.commodity_flag != 0 || item.num < item.limitNum}}">
  77. <view class="shixiao">失效</view>
  78. </block>
  79. <block wx:else>
  80. <view class="shixiao">售罄</view>
  81. </block>
  82. <!-- 跳转到商品详情 -->
  83. <view bindtap='buyUrl' data-comid="{{item.com_id}}" class="cart-thumb">
  84. <image src="{{item.logo}}"></image>
  85. </view>
  86. <view class="cart-pro-name shixiao_pro_name">{{item.name}}</view>
  87. <!-- 提示信息 -->
  88. <view class="shixiao_msg">
  89. <block wx:if="{{item.commodity_flag != 0}}">
  90. <view>该商品已下架</view>
  91. </block>
  92. <block wx:elif="{{item.num < item.limitNum}}">
  93. <view>请重新选择规格</view>
  94. </block>
  95. <block wx:else>
  96. <view>该商品已售罄</view>
  97. </block>
  98. </view>
  99. </view>
  100. <view data-index="{{index}}" data-id="{{item.id}}" data-flag="{{item.commodity_flag}}" catchtap = "delItem" class="inner del">删除</view>
  101. </block>
  102. </view>
  103. </view>
  104. <!-- </view> -->
  105. </block>
  106. <!-- 蒙层 -->
  107. <view class="modal_wrap {{hiddenmodal ? 'hidden' : ''}}">
  108. <view class="modal {{hiddenmodal ? 'hidden' : ''}}">{{modalCont}}</view>
  109. </view>
  110. <view wx:if="{{maskBg}}" class="modal_bg "></view>