shopCart.wxml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <view class='pb100'>
  2. <!-- <block wx:if="{{!cartsNull}}"> -->
  3. <view class="cart-tabs {{(is_open_vipcard_buy==1&&is_vip_card_member!=1)?'hasVip':''}}" wx:if="{{showTab}}">
  4. <view wx:for="{{tabList}}" wx:key='id' wx:if="{{item.enabled}}" class="cart-tabs-item {{tabIdx==index?'active':''}}" bindtap="changeTabs" data-idx="{{item.id}}" style="{{tabIdx==index?'color:'+skin.color+';border-color:'+skin.color:''}}">
  5. {{item.name}}
  6. </view>
  7. </view>
  8. <view class="cart-tabs {{(is_open_vipcard_buy==1&&is_vip_card_member!=1)?'hasVip':''}}" wx:elif="{{tabIdx==3}}">
  9. <view class="cart-tabs-item active" style="{{tabIdx==index?'color:'+skin.color+';border-color:'+skin.color:''}}">
  10. {{tabList[3].name}}
  11. </view>
  12. </view>
  13. <!-- </block> -->
  14. <!-- 开卡提示 -->
  15. <view class="fixed-vip {{(showTab||(!showTab&&tabIdx==3))?'hasVip':''}}" wx:if="{{is_open_vipcard_buy==1&&is_vip_card_member!=1}}">
  16. <view class="vip i-flex i-flex-spb">
  17. <view class="i-flex vip-name">
  18. <image src="{{modify_vipcard_logo}}" wx:if="{{modify_vipcard_logo}}" class="vip-logo"></image>
  19. <text class="iconfont icon-huiyuan" style="font-size:30rpx;" wx:else></text>
  20. <block wx:if="{{vipFee>0}}">开通“{{modify_vipcard_name}}”所选商品预计可省{{vipFee}}元</block>
  21. <block wx:else>“{{modify_vipcard_name}}” 尊享特权·会员专享价</block>
  22. </view>
  23. <view bindtap="goLink" data-link="/lionfish_comshop/moduleA/vip/upgrade">立即开通
  24. <text class="iconfont icon-youjiantou goright"></text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="h88" wx:if="{{(is_open_vipcard_buy==1&&is_vip_card_member!=1)}}"></view>
  29. <view class="h72" wx:if="{{showTab||(!showTab&&tabIdx==3)}}"></view>
  30. <view class="empty {{is_show_guess_like==1?'':'pos-a'}}" wx:if="{{isEmpty}}">
  31. <image src="../../images/icon-index-empty.png"></image>
  32. <block wx:if="{{needAuth}}">
  33. <view class="h1" bindtap="authModal">点击<text style="color:{{skin.color}}">“去登录”</text>查看购物车商品</view>
  34. <view bindtap="authModal" class="btn" style="background:{{skin.color}}">去登录</view>
  35. </block>
  36. <block wx:else>
  37. <view class="h1">购物车空空如也,赶紧去逛逛吧~</view>
  38. <view bindtap="goindex" class="btn" style="background:{{skin.color}}">去购物</view>
  39. </block>
  40. </view>
  41. <view class="shop-cart-content" wx:else>
  42. <!--购物车商品循环begin -->
  43. <i-card iClass="card-group" wx:for="{{carts}}" wx:key="index">
  44. <view class="fsz-22 theader" slot="header" wx:if="{{tabIdx==3}}">
  45. <view class="store-name fsz-24 weight">{{item.localtown_fixed_list.store_name}}</view>
  46. <view class="i-flex i-flex-spb" wx:if="{{localtown_fee_list[index].localtownCanBuy>0||localtown_fee_list[index].localtownManJian>0}}">
  47. <view class="store-localtown text-6">
  48. <block wx:if="{{localtown_fee_list[index].localtownCanBuy>0}}">还差<text style="color:{{skin.color}}">{{localtown_fee_list[index].localtownCanBuy}}</text>元就能起送</block>
  49. <block wx:if="{{localtown_fee_list[index].localtownCanBuy>0&&localtown_fee_list[index].localtownManJian>0}}">,</block>
  50. <block wx:if="{{localtown_fee_list[index].localtownManJian>0}}">再买<text style="color:{{skin.color}}">{{localtown_fee_list[index].localtownManJian}}</text>元可免费配送</block>
  51. </view>
  52. <block wx:if="{{localtown_fee_list[index].localtownCanBuy>0||localtown_fee_list[index].localtownManJian>0}}">
  53. <i-router-link url="{{index==0?'/lionfish_comshop/pages/index/index':'/lionfish_comshop/pages/supply/home?is_only_distribution=1&id='+index}}" style="color:{{skin.color}}">
  54. <view class="i-link">去凑单 <text class="iconfont icon-youjiantou fsz-22"></text></view>
  55. </i-router-link>
  56. </block>
  57. </view>
  58. </view>
  59. <view class="fsz-22 theader" slot="header" wx:if="{{tabIdx==2}}">
  60. <view class="store-name fsz-24 weight">{{item.localtown_fixed_list.store_name}}</view>
  61. </view>
  62. <view class="card-body" slot="content">
  63. <!--循环具体商品bg-->
  64. <view>
  65. <block wx:for="{{item.shopcarts}}" wx:for-item="shopcarts" wx:for-index="idx" wx:key="key">
  66. <view class='reduce-item' wx:if="{{shopcarts.can_man_jian==1}}">
  67. <view class="cart-item" slot="content">
  68. <label class="cart-item-checkbox {{item.isselect?'selected':''}}">
  69. <checkbox-group wx:if="{{shopcarts.can_buy==1&&shopcarts.option_can_buy==1}}" bindchange="goodsselect" data-parentid="{{index}}" data-index="{{idx}}" data-id="{{shopcarts.id}}" data-value="{{shopcarts.isselect}}">
  70. <view class="checkbox">
  71. <text class="iconfont icon-selected checkbox-checked" style="color:{{skin.color}}" wx:if="{{shopcarts.isselect}}"></text>
  72. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png" wx:else></image>
  73. <checkbox hidden checked="{{shopcarts.isselect}}" value="{{shopcarts.isselect}}"></checkbox>
  74. </view>
  75. </checkbox-group>
  76. <view class="checkbox" wx:else>
  77. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png"></image>
  78. </view>
  79. </label>
  80. <view class="cart-item-img">
  81. <i-img defaultImage="../../images/placeholder-refund.png" height="90" iClass="i-class" lazyLoad="true" loadImage="{{shopcarts.imgurl}}" width="90"></i-img>
  82. <view wx:if="{{shopcarts.can_buy==0||shopcarts.option_can_buy==0}}" class='tip'>已失效</view>
  83. <view wx:if="{{shopcarts.can_man_jian&&is_open_fullreduction&&shopcarts.can_buy!=0}}" class='tag'>满{{full_money}}减{{full_list[0].full_reducemoney}}</view>
  84. <view class='tag pos-top' wx:if="{{shopcarts.is_new_buy==1}}">新人专享</view>
  85. </view>
  86. <view class="cart-item-content">
  87. <view>
  88. <view class="title"><text class="tag" wx:if="{{shopcarts.store_id==0}}">自营</text> {{shopcarts.title}}</view>
  89. <view class="spec">{{shopcarts.goodstype}}</view>
  90. </view>
  91. <i-vip-price wx:if="{{is_open_vipcard_buy==1&&shopcarts.is_take_vipcard==1&&is_vip_card_member==1}}" price="{{shopcarts.card_price}}"></i-vip-price>
  92. <i-vip-price wx:elif="{{shopcarts.is_mb_level_buy}}" price="{{shopcarts.levelprice}}" type="1"></i-vip-price>
  93. <view class="cart-item-content-bottom">
  94. <view class="sale-price">
  95. ¥<span>{{shopcarts.currntprice}}</span>
  96. </view>
  97. <view wx:if="{{shopcarts.can_buy==1&&shopcarts.option_can_buy==1}}" class="i-class i-input-number i-input-number-size-{{size}}">
  98. <view class="i-input-number-minus " data-index="{{idx}}" data-parentid="{{index}}" bindtap="regoodsnum" data-gid="{{shopcarts.id}}">
  99. <image src="../../images/icon-input-reduce.png"></image>
  100. </view>
  101. <input bind:change="changeNumber" max="{{shopcarts.max_quantity}}" min="0" class="i-input-number-text " type="number" value="{{shopcarts.goodsnum}}" data-index="{{idx}}" data-parentid="{{index}}"></input>
  102. <view id="tapTest{{idx}}" class="i-input-number-plus " data-index="{{idx}}" data-parentid="{{index}}" bindtap="addgoodsnum" data-gid="{{shopcarts.id}}">
  103. <image src="../../images/icon-input-add.png"></image>
  104. </view>
  105. </view>
  106. <view wx:else bindtap="delete" class="delete-icon" data-parentid="{{index}}" data-index="{{idx}}" data-gid="{{shopcarts.id}}">
  107. <image src="../../images/icon-shop-delete.png"></image>删除
  108. </view>
  109. </view>
  110. </view>
  111. <view class="piece-reduce" wx:if="{{shopcarts.can_man_jian && item.is_open_fullreduction==1}}" style='display:none;'>
  112. <view class="tag-content">
  113. <view class="tag">满减</view>
  114. </view>满{{item.full_money}}减{{item.full_reducemoney}}
  115. </view>
  116. </view>
  117. <view class="swiper-out-button-content" slot="button" style="display:none;">
  118. <view bindtap="delete" class="delete-btn">删除</view>
  119. </view>
  120. </view>
  121. <view class='normal-item' wx:else>
  122. <view class="cart-item" slot="content">
  123. <label class="cart-item-checkbox {{item.isselect?'selected':''}}">
  124. <checkbox-group wx:if="{{shopcarts.can_buy==1&&shopcarts.option_can_buy==1}}" bindchange="goodsselect" data-parentid="{{index}}" data-index="{{idx}}" data-id="{{shopcarts.id}}" data-value="{{shopcarts.isselect}}">
  125. <view class="checkbox">
  126. <text class="iconfont icon-selected checkbox-checked" style="color:{{skin.color}}" wx:if="{{shopcarts.isselect}}"></text>
  127. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png" wx:else></image>
  128. <checkbox hidden checked="{{shopcarts.isselect}}" value="{{shopcarts.isselect}}"></checkbox>
  129. </view>
  130. </checkbox-group>
  131. <view class="checkbox" wx:else>
  132. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png"></image>
  133. </view>
  134. </label>
  135. <view class="cart-item-img">
  136. <i-img defaultImage="../../images/placeholder-refund.png" height="90" iClass="i-class" lazyLoad="true" loadImage="{{shopcarts.imgurl}}" width="90"></i-img>
  137. <view wx:if="{{shopcarts.can_buy==0||shopcarts.option_can_buy==0}}" class='tip'>已失效</view>
  138. <view class='tag pos-top' wx:if="{{shopcarts.is_new_buy==1}}">新人专享</view>
  139. </view>
  140. <view class="cart-item-content">
  141. <view>
  142. <view class="title"><text class="tag" wx:if="{{shopcarts.store_id==0}}">自营</text> {{shopcarts.title}}</view>
  143. <view class="spec">{{shopcarts.goodstype}}</view>
  144. </view>
  145. <i-vip-price wx:if="{{is_open_vipcard_buy==1&&shopcarts.is_take_vipcard==1&&is_vip_card_member==1}}" price="{{shopcarts.card_price}}"></i-vip-price>
  146. <i-vip-price wx:elif="{{shopcarts.is_mb_level_buy}}" price="{{shopcarts.levelprice}}" type="1"></i-vip-price>
  147. <view class="cart-item-content-bottom">
  148. <view class="sale-price">
  149. ¥<span>{{shopcarts.currntprice}}</span>
  150. </view>
  151. <view wx:if="{{shopcarts.can_buy==1&&shopcarts.option_can_buy==1}}" class="i-class i-input-number i-input-number-size-{{size}}">
  152. <view class="i-input-number-minus " data-index="{{idx}}" data-parentid="{{index}}" bindtap="regoodsnum" data-gid="{{shopcarts.id}}">
  153. <image src="../../images/icon-input-reduce.png"></image>
  154. </view>
  155. <input bind:change="changeNumber" max="{{shopcarts.max_quantity}}" min="0" class="i-input-number-text " type="number" value="{{shopcarts.goodsnum}}" data-index="{{idx}}" data-parentid="{{index}}"></input>
  156. <view id="tapTest{{idx}}" class="i-input-number-plus " data-index="{{idx}}" data-parentid="{{index}}" bindtap="addgoodsnum" data-gid="{{shopcarts.id}}">
  157. <image src="../../images/icon-input-add.png"></image>
  158. </view>
  159. </view>
  160. <view wx:else bindtap="delete" class="delete-icon" data-parentid="{{index}}" data-index="{{idx}}" data-id="{{shopcarts.id}}">
  161. <image src="../../images/icon-shop-delete.png"></image>删除
  162. </view>
  163. </view>
  164. </view>
  165. <view class="piece-reduce" wx:if="{{shopcarts.can_man_jian && item.is_open_fullreduction==1}}" style='display:none;'>
  166. <view class="tag-content">
  167. <view class="tag">满减</view>
  168. </view>满{{item.full_money}}减{{item.full_reducemoney}}
  169. </view>
  170. </view>
  171. <view class="swiper-out-button-content" slot="button" style="display:none;">
  172. <view bindtap="delete" class="delete-btn">删除</view>
  173. </view>
  174. </view>
  175. </block>
  176. </view>
  177. <!--循环具体商品end--->
  178. </view>
  179. </i-card>
  180. <!--购物车商品循环结束-->
  181. <!-- 失效 -->
  182. <i-card wx:if="{{hasInvalid>0}}">
  183. <view slot="header">
  184. <view class="i-flex i-flex-spb invalid-head">
  185. <view></view>
  186. <view bindtap="clearlose">清空 <text class="iconfont icon-shanchu1"></text></view>
  187. </view>
  188. </view>
  189. <view slot="content">
  190. <i-card iClass="invalid-card-group" wx:for="{{invalidCarts}}" wx:key="id">
  191. <view class="card-body" slot="content">
  192. <!--循环具体商品bg-->
  193. <view>
  194. <view class='normal-item' wx:for="{{item.shopcarts}}" wx:for-item="shopcarts" wx:for-index="idx" wx:key="key">
  195. <view class="cart-item" slot="content">
  196. <label class="cart-item-checkbox">
  197. <text class="invalid-tip" wx:if="{{shopcarts.can_buy==0}}">售罄</text>
  198. <text class="invalid-tip" wx:elif="{{shopcarts.option_can_buy==0}}">失效</text>
  199. <view class="checkbox" wx:else>
  200. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png"></image>
  201. </view>
  202. </label>
  203. <view class="cart-item-img">
  204. <i-img defaultImage="../../images/placeholder-refund.png" height="90" iClass="i-class" lazyLoad="true" loadImage="{{shopcarts.imgurl}}" width="90"></i-img>
  205. </view>
  206. <view class="cart-item-content">
  207. <view>
  208. <view class="title">{{shopcarts.title}}</view>
  209. <view class="spec">{{shopcarts.goodstype}}</view>
  210. </view>
  211. <view class="cart-item-content-bottom">
  212. <view wx:if="{{shopcarts.can_buy==0}}">已售罄</view>
  213. <view wx:if="{{shopcarts.option_can_buy==0}}">规格失效</view>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. </view>
  219. <!--循环具体商品end--->
  220. </view>
  221. </i-card>
  222. </view>
  223. </i-card>
  224. </view>
  225. <view class="fixed-bar safebottom" wx:if="{{!isEmpty}}">
  226. <!-- 免邮 -->
  227. <view class="fullreductionInfo" wx:if="{{man_free_tuanzshipping>0&&delivery_tuanz_money>0&&tabIdx==0&&open_tuan_ship==1}}">
  228. <view class="fr-left">
  229. <view class="active-msg diff-money" wx:if="{{diffDeliveryMoney>0}}">
  230. 自营满{{man_free_tuanzshipping}}免配送费{{delivery_tuanz_money}},还差<text style="color:{{skin.color}}">{{diffDeliveryMoney}}</text>元
  231. </view>
  232. <view class="active-msg" wx:else>自营满¥{{man_free_tuanzshipping}}免配送费¥{{delivery_tuanz_money}}</view>
  233. </view>
  234. <i-router-link url="/lionfish_comshop/pages/index/index" wx:if="{{diffDeliveryMoney<0&&man_free_tuanzshipping>0&&delivery_tuanz_money>0}}" style="color:{{skin.color}}">
  235. <view class="i-link">去凑单 <text class="iconfont icon-youjiantou"></text>
  236. </view>
  237. </i-router-link>
  238. </view>
  239. <!-- 优惠信息 -->
  240. <view class="fullreductionInfo" wx:if="{{is_open_fullreduction==1}}">
  241. <view class="i-flex-item full_list text-center" style="width: 0;" wx:if="{{allcount==0||isCanManJian==0}}">
  242. <scroll-view scroll-x>
  243. <view class="scroll-full" wx:if="{{full_list.length>0}}">
  244. <view class="fr-left" wx:for="{{full_list}}" wx:key="index" wx:if="{{!item.disable}}">
  245. <view class="active-msg">
  246. 满<text style="color:{{skin.color}}">{{item.full_money}}</text>减<text style="color:{{skin.color}}">{{item.full_reducemoney}}</text><block wx:if="{{(index+1)<full_list.length}}">,</block>
  247. </view>
  248. </view>
  249. </view>
  250. </scroll-view>
  251. </view>
  252. <view class="i-flex-item i-flex i-flex-alc" wx:else>
  253. <view class="active-msg" wx:if="{{sucess_full_item}}">
  254. 已享<text style="color:{{skin.color}}">{{sucess_full_item.full_money}}</text>减<text style="color:{{skin.color}}">{{sucess_full_item.full_reducemoney}}</text><block wx:if="{{cur_full_item}}">,</block>
  255. </view>
  256. <block wx:if="{{cur_full_item&&nextDiffMoney&&nextDiffMoney!='0.00'}}">
  257. <view class="active-msg">
  258. 再买<text style="color:{{skin.color}}">{{nextDiffMoney}}</text>元,可享<text style="color:{{skin.color}}">{{cur_full_item.full_money}}</text>减<text style="color:{{skin.color}}">{{cur_full_item.full_reducemoney}}</text>
  259. </view>
  260. <i-router-link url="/lionfish_comshop/pages/index/index" wx:if="{{is_open_fullreduction==1}}">
  261. <view class="i-link ml10" style="color:{{skin.color}}">
  262. 去凑单 <text class="iconfont icon-youjiantou"></text>
  263. </view>
  264. </i-router-link>
  265. </block>
  266. </view>
  267. </view>
  268. <view class='cart-bar'>
  269. <label class="cart-item-checkbox">
  270. <checkbox-group bindchange="allselect" data-value="{{allselect}}">
  271. <view class="checkbox">
  272. <text class="iconfont icon-selected checkbox-checked" style="color:{{skin.color}}" wx:if="{{allselect}}"></text>
  273. <image class="checkbox-disabled" src="../../images/checkbox-disabled.png" wx:else></image>
  274. <checkbox hidden checked="{{allselect}}" value="{{allselect}}"></checkbox>
  275. </view>
  276. </checkbox-group>
  277. 全选
  278. </label>
  279. <view class="fixed-bar-center">
  280. <view class="total">
  281. 合计:
  282. <span>¥{{totalAmount}}</span>
  283. </view>
  284. <view class="total-detail">
  285. <span>总额:¥{{allcount}}</span>
  286. <span>优惠:¥{{disAmount}}</span>
  287. </view>
  288. </view>
  289. <button class='fixed-bar-btn' wx:if="{{is_comunity_rest==1}}" style='background:#dcdcdc;'>{{groupInfo.owner_name}}休息中</button>
  290. <block wx:elif="{{open_man_orderbuy==1}}">
  291. <button class='fixed-bar-btn' bindtap="toorder" wx:if="{{canbuy_other>=0}}">去结算({{allnum}})</button>
  292. <button class='fixed-bar-btn' bindtap="toorder" disabled wx:else>
  293. <text wx:if="{{canbuy_tot!=0}}">差</text>
  294. <text wx:else>满</text>¥{{-canbuy_other}}下单</button>
  295. </block>
  296. <block wx:elif="{{tabIdx==3&&!localtownCanBuy}}">
  297. <button class='fixed-bar-btn' disabled>去结算</button>
  298. </block>
  299. <button class='fixed-bar-btn' bindtap="toorder" style="background:{{skin.color}}" wx:else>去结算({{allnum}})</button>
  300. </view>
  301. </view>
  302. <view class="fixed-bar safebottom" wx:if="{{isEmpty&&is_open_fullreduction==1&&full_list.length>0}}">
  303. <view class="fullreductionInfo">
  304. <view class="i-flex-item full_list text-center" style="width: 0;">
  305. <scroll-view scroll-x>
  306. <view class="scroll-full">
  307. <view class="fr-left" wx:for="{{full_list}}" wx:key="index" wx:if="{{!item.disable}}">
  308. <view class="active-msg">
  309. 满<text style="color:{{skin.color}}">{{item.full_money}}</text>减<text style="color:{{skin.color}}">{{item.full_reducemoney}}</text><block wx:if="{{(index+1)<full_list.length}}">,</block>
  310. </view>
  311. </view>
  312. </view>
  313. </scroll-view>
  314. </view>
  315. </view>
  316. </view>
  317. <!-- 猜你喜欢 -->
  318. <guess-like bind:openSku="openSku" wx:if="{{is_show_guess_like==1}}" bind:changeCartNum="showCartGoods" updateCart="{{updateCart}}" bind:vipModal="vipModal"></guess-like>
  319. <i-tabbar currentIdx='3' cartNum='{{cartNum}}' tabbarRefresh="{{tabbarRefresh}}" needAuth="{{needAuth}}" bind:authModal="authModal" />
  320. </view>
  321. <i-new-auth needAuth="{{needAuth&&showAuthModal}}" bind:authSuccess="authSuccess" bind:cancel="authModal"></i-new-auth>
  322. <!---规格选择begin-->
  323. <i-sku visible="{{visible}}" skuList="{{skuList}}" cur_sku_arr="{{cur_sku_arr}}" bind:cancel="closeSku" sku_val="{{sku_val}}" sku="{{sku}}" goodsid="{{addCar_goodsid}}" bind:changeCartNum="changeCartNum" bind:vipModal="vipModal"></i-sku>
  324. <!---规格选择end-->
  325. <i-vip-modal visible="{{showVipModal}}" imgUrl="{{pop_vipmember_buyimage}}" />
  326. <!-- 弹窗广告 -->
  327. <ad-alert pop_page="2" />