cart.wxml 4.0 KB

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