cart.wxml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <view class="container">
  2. <view class="no-login" wx:if="{{!hasLogin}}">
  3. <view class="c">
  4. <image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
  5. <text>还没有登录</text>
  6. <button plain="true" bindtap="goLogin">去登录</button>
  7. </view>
  8. </view>
  9. <view class='login' wx:else>
  10. <view class="service-policy">
  11. <view class="item">30天无忧退货</view>
  12. <view class="item">48小时快速退款</view>
  13. <view class="item">满88元免邮费</view>
  14. </view>
  15. <view class="no-cart" wx:if="{{cartGoods.length <= 0}}">
  16. <view class="c">
  17. <image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
  18. <text>去添加点什么吧</text>
  19. </view>
  20. </view>
  21. <view class="cart-view" wx:else>
  22. <view class="list">
  23. <view class="group-item">
  24. <view class="goods">
  25. <view class="item {{isEditCart ? 'edit' : ''}}" wx:for="{{cartGoods}}" wx:key="id">
  26. <view class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
  27. <view class="cart-goods">
  28. <image class="img" src="{{item.picUrl}}"></image>
  29. <view class="info">
  30. <view class="t">
  31. <text class="name">{{item.goodsName}}</text>
  32. <text class="num">x{{item.number}}</text>
  33. </view>
  34. <view class="attr">{{ isEditCart ? '已选择:' : ''}}{{item.specifications||''}}</view>
  35. <view class="b">
  36. <text class="price">¥{{item.price}}</text>
  37. <view class="selnum">
  38. <view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
  39. <input value="{{item.number}}" class="number" disabled="true" type="number" />
  40. <view class="add" bindtap="addNumber" data-item-index="{{index}}">+</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="cart-bottom">
  50. <view class="checkbox {{checkedAllStatus ? 'checked' : ''}}" bindtap="checkedAll">全选({{cartTotal.checkedGoodsCount}})</view>
  51. <view class="total">{{!isEditCart ? '¥'+cartTotal.checkedGoodsAmount : ''}}</view>
  52. <view class="delete" bindtap="editCart">{{!isEditCart ? '编辑' : '完成'}}</view>
  53. <view class="checkout" bindtap="deleteCart" wx:if="{{isEditCart}}">删除所选</view>
  54. <view class="checkout" bindtap="checkoutOrder" wx:if="{{!isEditCart}}">下单</view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>