index.wxml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!--
  2. - Copyright (C) 2018-2019
  3. - All rights reserved, Designed By www.joolun.com
  4. - 注意:
  5. - 本软件为www.joolun.com开发研制,项目使用请保留此说明
  6. -->
  7. <wxs module="numberUtil" src="../../utils/numberUtil.wxs"></wxs>
  8. <view class="cu-bar bg-white fixed" style="min-height: 80rpx;font-weight: 300;">
  9. <view class="grid col-3 response text-center text-gray">
  10. <view><text class="cuIcon-selection margin-right-xs"></text>100%正品保证</view>
  11. <view><text class="cuIcon-discover margin-right-xs"></text>精挑细选</view>
  12. <view><text class="cuIcon-squarecheck margin-right-xs"></text>售后无忧</view>
  13. </view>
  14. </view>
  15. <view class="cu-bar bg-white solid-bottom solid-top fixed" style="margin-top:80rpx; min-height: 80rpx;box-shadow:none;">
  16. <view class="action">
  17. 共{{ shoppingCartData.length }}件宝贝
  18. </view>
  19. <view class="action">
  20. <button class="cu-btn line-gray sm" bindtap="operation">{{operation ? '管理' : '完成'}}</button>
  21. </view>
  22. </view>
  23. <view class="bg-white" style="margin-top:160rpx;margin-bottom:100rpx;padding-top:40rpx;padding-bottom: 50px;">
  24. <checkbox-group bindchange="checkboxChange">
  25. <view class="cu-card article no-card solid-bottom">
  26. <view class="cu-item padding-top-xs" wx:for="{{ shoppingCartData }}" wx:key="index">
  27. <view class="flex align-center">
  28. <checkbox class="blue round margin-left" value="{{item.id}}" disabled="{{(item.quantity > item.goodsSpu.stock || !item.goodsSpu) && operation}}" checked="{{item.checked}}"></checkbox>
  29. <navigator hover-class='none' style="width:100%" url='/pages/goods/goods-detail/index?id={{item.spuId}}'>
  30. <view class="content">
  31. <image src="{{item.goodsSpu.picUrls[0] ? item.goodsSpu.picUrls[0] : '/public/img/no_pic.png'}}" mode="aspectFill" class="row-img margin-top-xs"></image>
  32. <view class="desc row-info">
  33. <view class="text-black margin-top-sm overflow-2">{{item.goodsSpu.name}}</view>
  34. <view class="text-gray text-sm margin-top-xs cu-tag round" catchtap bindtap="changeSpecs" data-spuid="{{item.goodsSpu.id}}" data-index="{{index}}" wx:if="{{item.goodsSpu.specType == '1'}}">
  35. <text class="overflow-1"></text>
  36. <text class="cuIcon-unfold"></text>
  37. </view>
  38. <view class="text-{{item.quantity > item.goodsSpu.stock ? 'red' : 'gray'}} margin-top-sm text-right text-sm">库存{{item.goodsSpu.stock}}</view>
  39. <view wx:if="{{item.goodsSpu}}">
  40. <view class="text-red margin-top-sm" wx:if="{{(item.addPrice-item.goodsSpu.salesPrice) > 0}}">
  41. 比加入时降
  42. <view class="text-price display-ib">{{numberUtil.numberFormat(item.addPrice-item.goodsSpu.salesPrice,2)}}</view>
  43. </view>
  44. <view class="flex">
  45. <view class="flex-sub">
  46. <view class="text-price text-bold text-blue text-xl margin-top-sm">{{item.goodsSpu.salesPrice}}</view>
  47. </view>
  48. <view class="flex-sub margin-top-sm" catchtap>
  49. <base-stepper
  50. stNum="{{item.quantity}}"
  51. min="1"
  52. max="{{item.goodsSpu.stock}}"
  53. bind:numChange="cartNumChang"
  54. data-index="{{index}}"
  55. />
  56. </view>
  57. </view>
  58. </view>
  59. <view wx:if="{{!item.goodsSpu}}" class="margin-top-sm">
  60. <view class="text-red">请重新选择规格</view>
  61. </view>
  62. </view>
  63. </view>
  64. </navigator>
  65. </view>
  66. </view>
  67. </view>
  68. </checkbox-group>
  69. <!-- 失效商品 -->
  70. <view class="cu-bar bg-white solid-bottom margin-top" wx:if="{{shoppingCartDataInvalid.length > 0}}">
  71. <view class="action">
  72. 失效宝贝{{ shoppingCartDataInvalid.length }}件
  73. </view>
  74. <view class="action">
  75. <button class="cu-btn line-blue round" bindtap="clearInvalid">清空失效宝贝</button>
  76. </view>
  77. </view>
  78. <view class="cu-card article no-card">
  79. <view class="cu-item" wx:for="{{ shoppingCartDataInvalid }}" wx:key="index">
  80. <view class="flex align-center">
  81. <navigator hover-class='none' style="width:100%" url='/pages/goods/goods-detail/index?id={{item.spuId}}'>
  82. <view class="content">
  83. <image src="{{item.goodsSpu.picUrls[0] ? item.goodsSpu.picUrls[0] : '/public/img/no_pic.png'}}" mode="aspectFill" class="row-img margin-top-xs"></image>
  84. <view class="desc row-info">
  85. <view class="text-black margin-top-sm overflow-2">{{item.goodsSpu.name}}</view>
  86. <view class="text-sm margin-top-lg text-blue">
  87. 已下架
  88. </view>
  89. </view>
  90. </view>
  91. </navigator>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="cu-load bg-gray {{loadmore?'loading':''}}"></view>
  96. <view class="text-center margin-bottom" wx:if="{{ shoppingCartData.length <= 0 && !loadmore}}">
  97. <view class="text-xsl margin-top without">
  98. <image class="margin-top-sm" src="/public/img/shopping-cart.jpg"></image>
  99. </view>
  100. 购物车空空如也~
  101. <navigator hover-class='none' url='/pages/goods/goods-list/index'>
  102. <button class="cu-btn bg-black margin-top">去逛逛</button>
  103. </navigator>
  104. </view>
  105. <ad unit-id="{{config.adBannerID}}" wx:if="{{config.adEnable}}"></ad>
  106. <view class="cu-bar justify-center bg-white margin-top-sm">
  107. <view class='action text-blue text-bold'>
  108. <text class='cuIcon-move'></text> <text class='cuIcon-appreciate'></text>为您推荐 <text class='cuIcon-move'></text>
  109. </view>
  110. </view>
  111. <goods-card goodsList="{{goodsListRecom}}"/>
  112. </view>
  113. <view class="cu-bar bg-white tabbar border shop foot">
  114. <view class="flex align-center">
  115. <checkbox-group bindchange="checkboxAllChange">
  116. <checkbox class="blue round margin-left" value="all" checked="{{isAllSelect}}"></checkbox>
  117. </checkbox-group>
  118. <view class="text-lg margin-left-xs">全选</view>
  119. </view>
  120. <view class="action bar-rt" wx:if="{{operation}}">
  121. <text class="text-xs text-bold">合计:</text>
  122. <text class="text-xl text-bold text-price text-blue margin-right-sm">{{settlePrice}}</text>
  123. <button class="cu-btn shadow-blur margin-left-sm settle-bt" disabled="{{selectValue.length <= 0}}" type="" bindtap="orderConfirm">
  124. <text class="text-white">结算{{selectValue.length > 0 ? '('+selectValue.length+')' : ''}}</text>
  125. </button>
  126. </view>
  127. <view class="action bar-rt" wx:if="{{!operation}}">
  128. <button class="cu-btn shadow-blur collection" disabled="{{selectValue.length <= 0}}" bindtap="userCollectAdd"><text class="text-white">移入收藏夹</text></button>
  129. <button class="cu-btn shadow-blur margin-left-sm delete" disabled="{{selectValue.length <= 0}}" bindtap="shoppingCartDel"><text class="text-white">删除</text></button>
  130. </view>
  131. </view>