index.wxml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <view class="container p-bottom">
  2. <view class="flow-list">
  3. <view wx:if="{{goods_list.length}}">
  4. <view class="cart-edit-wrap dis-flex flex-x-end">
  5. <text wx:if="{{ action === 'complete' }}" catchtap="switchAction" class="f-30" data-action="edit">编辑</text>
  6. <text wx:if="{{ action === 'edit' }}" catchtap="switchAction" class="f-30" data-action="complete">完成</text>
  7. </view>
  8. <view wx:for="{{goods_list}}" wx:key="this">
  9. <view class="dish-item dis-flex flex-y-center" data-index="{{index}}" style="{{item.txtStyle}}">
  10. <!-- 选择框 -->
  11. <view class="dish-item-radio" catchtap="onChecked" data-index="{{ index }}">
  12. <label class="radio">
  13. <radio checked="{{ item.checked }}" color="#ff495e"></radio>
  14. </label>
  15. </view>
  16. <view class="dish-item-wrp dis-flex flex-box">
  17. <!-- 商品图片 -->
  18. <navigator hover-class="none" url="../goods/index?goods_id={{item.goods_id}}">
  19. <view class="dish-item-pic">
  20. <image mode="aspectFill" class="image" src="{{ item.goods_image }}"></image>
  21. </view>
  22. </navigator>
  23. <!-- 商品信息 -->
  24. <view class="dish-item-info flex-box">
  25. <navigator hover-class="none" url="../goods/index?goods_id={{item.goods_id}}">
  26. <view class="goods-name">
  27. <text class="twolist-hidden f-28 col-3">{{item.goods_name}}</text>
  28. </view>
  29. <view class="goods-attr dis-flex">
  30. <text class="col-7 f-24">{{item.goods_sku.goods_attr}}</text>
  31. </view>
  32. </navigator>
  33. <view class="dis-flex flex-x-between m-top20">
  34. <!-- 商品价格 -->
  35. <view class="wx-goods_price dis-flex flex-y-center">
  36. <text wx:if="{{ item.is_user_grade }}" class="dish-item-money">¥{{ item.grade_goods_price }}</text>
  37. <text wx:else class="dish-item-money">¥{{ item.goods_price }}</text>
  38. </view>
  39. <!-- 数量选择器 -->
  40. <view class="select-number">
  41. <button catchtap="onSubCount" class="default {{ item.total_num > 1 ? '' : 'disabled' }}" data-index="{{index}}" data-sku-id="{{item.goods_sku_id}}" type="default">-</button>
  42. <input bindinput="import" disabled="{{true}}" type="number" value="{{item.total_num}}"></input>
  43. <button catchtap="onAddCount" class="default" data-index="{{index}}" data-sku-id="{{item.goods_sku_id}}" type="default">+</button>
  44. </view>
  45. </view>
  46. <!-- 删除按钮 -->
  47. <!-- <view catchtap="del" class="flow-dete" data-goods-id="{{item.goods_id}}" data-sku-id="{{item.goods_sku_id}}">
  48. <text class="iconfont icon-lajixiang"></text>
  49. </view> -->
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 底部操作栏 -->
  55. <view class="cart-tab-wrp">
  56. <view class="cart-item-total cart-tab-item dis-flex flex-y-center">
  57. <view class="checked-all">
  58. <label catchtap="onCheckedAll" class="radio dis-flex flex-y-center">
  59. <radio class="margin-right: 10rpx;" checked="{{ checkedAll }}" color="#ff495e"></radio>
  60. <text class="f-28">全选</text>
  61. </label>
  62. </view>
  63. <view wx:if="{{ action === 'complete' }}" class="cart-item-total-price dis-flex">
  64. <text class="f-28 col-m">合计:¥{{cartTotalPrice}}</text>
  65. </view>
  66. </view>
  67. <view class="cart-tab-item_1">
  68. <view wx:if="{{ action === 'complete' }}" catchtap="submit" class="cart-tab-item-btn">去结算</view>
  69. <view wx:if="{{ action === 'edit' }}" catchtap="onDelete" class="cart-tab-item-btn">删除</view>
  70. </view>
  71. </view>
  72. </view>
  73. <view wx:else>
  74. <view class="yoshop-notcont">
  75. <text class="iconfont icon-wushuju"></text>
  76. <text class="cont">亲,购物车还没有商品哦</text>
  77. <view catchtap="goShopping" class="flow-btn-min">去购物</view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>