order_addcart.wxml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <navbar parameter="{{parameter}}"></navbar>
  2. <view class="shoppingCart">
  3. <view class="labelNav acea-row row-around row-middle" style="top:{{navH}}rpx">
  4. <view class="item"><text class="iconfont icon-xuanzhong"></text>100%正品保证</view>
  5. <view class="item"><text class="iconfont icon-xuanzhong"></text>所有商品精挑细选</view>
  6. <view class="item"><text class="iconfont icon-xuanzhong"></text>售后无忧</view>
  7. </view>
  8. <view class="nav acea-row row-between-wrapper" style="top:{{navH+76}}rpx">
  9. <view>购物数量 <text class="num font-color">{{cartCount}}</text></view>
  10. <view
  11. wx:if="{{cartList.valid.length > 0 || cartList.invalid.length > 0}}"
  12. class="administrate acea-row row-center-wrapper"
  13. bindtap="manage"
  14. >{{ footerswitch ? '管理' : '取消'}}</view
  15. >
  16. </view>
  17. <view wx:if="{{cartList.valid.length > 0 || cartList.invalid.length > 0}}">
  18. <view class="list">
  19. <checkbox-group bindchange="checkboxChange">
  20. <block wx:for="{{cartList.valid}}" wx:key="index">
  21. <view class="item acea-row row-between-wrapper">
  22. <checkbox value="{{item.id}}" checked="{{item.checked}}" />
  23. <navigator
  24. url="/pages/goods_details/index?id={{item.product_id}}"
  25. hover-class="none"
  26. class="picTxt acea-row row-between-wrapper"
  27. >
  28. <view class="picTxt acea-row row-between-wrapper">
  29. <view class="pictrue">
  30. <image wx:if="{{item.productInfo.attrInfo}}" src="{{item.productInfo.attrInfo.image}}"></image>
  31. <image wx:else src="{{item.productInfo.image}}"></image>
  32. </view>
  33. <view class="text">
  34. <view class="line1">{{item.productInfo.store_name}}</view>
  35. <view class="infor line1" wx:if="{{item.productInfo.attrInfo}}">
  36. 属性:{{item.productInfo.attrInfo.suk}}</view
  37. >
  38. <view class="money">¥{{item.truePrice}}</view>
  39. </view>
  40. <view class="carnum acea-row row-center-wrapper">
  41. <view class="reduce {{item.numSub ? 'on' : ''}}" catchtap="subCart" data-index="{{index}}">-</view>
  42. <view class="num">
  43. <input
  44. type="number"
  45. value="{{item.cart_num}}"
  46. data-name="item.cart_num"
  47. catchinput="iptCartNum"
  48. data-index="{{index}}"
  49. bindblur="inputBlur"
  50. catchtap="proventD"
  51. />
  52. </view>
  53. <view class="plus {{item.numAdd ? 'on' : ''}}" catchtap="addCart" data-index="{{index}}">+</view>
  54. </view>
  55. </view>
  56. </navigator>
  57. </view>
  58. </block>
  59. </checkbox-group>
  60. </view>
  61. <view class="invalidGoods" wx:if="{{cartList.invalid.length > 0}}">
  62. <view class="goodsNav acea-row row-between-wrapper">
  63. <view bindtap="goodsOpen"
  64. ><text class='iconfont {{goodsHidden==true?"icon-xiangxia":"icon-xiangshang"}}'></text>失效商品</view
  65. >
  66. <view class="del" bindtap="unsetCart"><text class="iconfont icon-shanchu1"></text>清空</view>
  67. </view>
  68. <view class="goodsList" hidden="{{goodsHidden}}">
  69. <block wx:for="{{cartList.invalid}}" wx:key="index">
  70. <view class="item acea-row row-between-wrapper">
  71. <view class="invalid">失效</view>
  72. <view class="pictrue">
  73. <image wx:if="{{item.productInfo.attrInfo}}" src="{{item.productInfo.attrInfo.image}}"> </image>
  74. <image wx:else src="{{item.productInfo.image}}"></image>
  75. </view>
  76. <view class="text acea-row row-column-between">
  77. <view class="line1">{{item.productInfo.store_name}}</view>
  78. <view class="infor line1" wx:if="{{item.productInfo.attrInfo}}">
  79. 属性:{{item.productInfo.attrInfo.suk}}</view
  80. >
  81. <view class="acea-row row-between-wrapper">
  82. <view wx:if="{{item.truePrice}}">¥{{item.truePrice}}</view>
  83. <view class="end">该商品已失效</view>
  84. </view>
  85. </view>
  86. </view>
  87. </block>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="noCart" wx:if="{{cartList.valid.length == 0 && cartList.invalid.length == 0}}">
  92. <view class="pictrue">
  93. <image src="/images/noCart.png"></image>
  94. </view>
  95. <recommend host_product="{{host_product}}"></recommend>
  96. </view>
  97. <view style="height: 120rpx"></view>
  98. <view class="footer acea-row row-between-wrapper" wx:if="{{cartList.valid.length > 0}}">
  99. <view>
  100. <checkbox-group bindchange="checkboxAllChange">
  101. <checkbox value="all" checked="{{isAllSelect}}" /><text class="checkAll">全选 ({{cartCount}})</text>
  102. </checkbox-group>
  103. </view>
  104. <view class="money acea-row row-middle" wx:if="{{footerswitch==true}}">
  105. <text class="font-color">¥{{selectCountPrice}}</text>
  106. <form bindsubmit="subOrder">
  107. <button class="placeOrder bg-color" formType="submit">立即下单</button>
  108. </form>
  109. </view>
  110. <view class="button acea-row row-middle" wx:else>
  111. <form bindsubmit="subCollect">
  112. <button class="bnt cart-color" formType="submit">收藏</button>
  113. </form>
  114. <form bindsubmit="subDel">
  115. <button class="bnt" formType="submit">删除</button>
  116. </form>
  117. </view>
  118. </view>
  119. </view>
  120. <authorize bind:onLoadFun="onLoadFun" bind:onCloseAuto="onCloseAuto" isGoIndex="{{isGoIndex}}" isHidden="{{isHidden}}">
  121. </authorize>