cart.wxml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <view class="container">
  2. <!-- <view class="no-login" wx:if="{{!hasLogin}}">
  3. <view class="c">
  4. <text>您还没有注册</text>
  5. <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
  6. <image class="wechat" src="/static/images/wechat.png"></image>
  7. 点击授权微信登录</button>
  8. </view>
  9. </view> -->
  10. <!-- wx:else -->
  11. <view class='login' >
  12. <!--<view class="service-policy">
  13. <view class="item">30天无忧退货</view>
  14. <view class="item">48小时快速退款</view>
  15. <view class="item">满88元免邮费</view>
  16. </view>-->
  17. <view class="no-cart" wx:if="{{cartGoods.length <= 0}}">
  18. <view class="c">
  19. <image src='/static/images/cart.png' bindtap="goIndex"></image>
  20. <text>空空如也~</text>
  21. <text>去添加点什么吧</text>
  22. </view>
  23. </view>
  24. <view class="cart-view" wx:else>
  25. <view class="list">
  26. <view class="group-item">
  27. <view class="goods">
  28. <!-- <view class="item {{isEditCart ? 'edit' : ''}}" wx:for="{{cartGoods}}" wx:key="id">
  29. <van-checkbox value="{{ item.checked }}" bind:change="checkedItem" data-item-index="{{index}}"></van-checkbox>
  30. <view class="cart-goods">
  31. <image class="img" src="{{item.picUrl}}"></image>
  32. <view class="info">
  33. <view class="t">
  34. <text class="name">{{item.goodsName}}</text>
  35. <text class="num">x{{item.number}}</text>
  36. </view>
  37. <view class="attr">{{ isEditCart ? '已选择:' : ''}}{{item.specifications||''}}</view>
  38. <view class="b">
  39. <text class="price">¥{{item.price}}</text>
  40. <view class="selnum">
  41. <view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
  42. <input value="{{item.number}}" class="number" disabled="true" type="number" />
  43. <view class="add" bindtap="addNumber" data-item-index="{{index}}">+</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>-->
  49. <view class="item edit" wx:for="{{cartGoods}}" wx:key="id">
  50. <van-checkbox value="{{ item.checked }}" bind:change="checkedItem" data-item-index="{{index}}"></van-checkbox>
  51. <view class="cart-goods">
  52. <image class="img" src="{{item.picUrl}}"></image>
  53. <view class="info">
  54. <view class="t">
  55. <text class="name">{{item.commodityName}}</text>
  56. <!--<text class="num">x{{item.number}}</text>-->
  57. </view>
  58. <view class="attr">{{item.attributeValue||''}}</view>
  59. <view class="b">
  60. <text class="price">¥{{item.price}}</text>
  61. <view class="selnum">
  62. <view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
  63. <input value="{{item.number}}" class="number" disabled="true" type="number" />
  64. <view class="add" bindtap="addNumber" data-item-index="{{index}}">+</view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="cart-bottom">
  74. <van-checkbox value="{{ checkedAllStatus }}" bind:change="checkedAll">全选({{cartTotal.checkedGoodsCount}})</van-checkbox>
  75. <view class="total">合计:{{'¥'+cartTotal.checkedGoodsAmount}}</view>
  76. <view class='action_btn_area'>
  77. <!--<view class="{{!isEditCart ? 'edit' : 'sure'}}" bindtap="editCart">{{!isEditCart ? '编辑' : '完成'}}</view>
  78. <view class="delete" bindtap="deleteCart" wx:if="{{isEditCart}}">删除({{cartTotal.checkedGoodsCount}})</view>-->
  79. <view class="checkout" bindtap="checkoutOrder" >结算</view>
  80. <!-- </view> -->
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. </view>