shopCart.wxml
4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!--shopCart.wxml-->
<import src="/pages/shopCart/headerView/shoppingCartFloatHeaderView.wxml"/>
<import src="/pages/shopCart/cells/shoppingCartProductCell.wxml"/>
<import src="/pages/shopCart/cells/shoppingCartGiftOrPriceCell.wxml"/>
<import src="/pages/shopCart/cells/shoppingCartInvalidProductCell.wxml"/>
<import src="/pages/shopCart/cells/shoppingCartPromotionCell.wxml"/>
<import src="/pages/shopCart/headerView/shoppingCartFooterView.wxml"/>
<import src="/pages/shopCart/cells/shoppingCartOneProductCell.wxml"/>
<import src="/pages/goodsDetail/picker/picker.wxml"/>
<view wx:if="{{curShoppingCartData.has_product_in_shop_cart}}" class="container">
<!-- <view class="navigator">
<view class="productTab">
<view class="leftTab" data-type="normalProduct" bindtap="naviTabSelected">
<view class="navText {{isSelectCommonNavi? 'navTextSelected' : ''}}">
{{commonProductNaviTitle}}
</view>
</view>
<view class="naviLine">
</view>
<view class="rightTab"
data-type="presellProduct"
bindtap="naviTabSelected">
<view class="navText {{!isSelectCommonNavi? 'navTextSelected' : ''}}">{{presellProductNavTitle}}</view>
</view>
</view>
</view> -->
<view wx:if="{{curShoppingCartData.shipping_cost_prompt.shipping_cost_tips != '' || curShoppingCartData.price_down_prompt.price_down_tips != ''}}" class="floatHeaderContainer">
<view wx:if="{{curShoppingCartData.price_down_prompt.price_down_tips && !has_close_price_down_tip}}" class="priceDownTipsContainer">
<text class="shippingCostTip priceDownTitle">{{curShoppingCartData.price_down_prompt.price_down_tips}}</text>
<image class="priceDownTipsClose" bindtap='tapPriceDownTipsAction' src="images/close_icon@2x.png"></image>
</view>
<view wx:else class="shippingCostTip">{{curShoppingCartData.shipping_cost_prompt.shipping_cost_tips}}</view>
<view class="editBtn" bindtap="editBtnSelected" wx:if="{{!isEditing}}">编辑</view>
<view class="editBtn" bindtap="editCompletedAction" wx:if="{{isEditing}}">完成</view>
</view>
<scroll-view scroll-y="{{enableScroll}}" class="contentContainer" style="position: absolute;top:{{scrollerViewTop}}px;height:{{scrollerViewHeight}}px" >
<!--商品池 -->
<view wx:if="{{curShoppingCartData.goods_pool_list.length}}" class="goodsPoolListContainer">
<template is="shoppingCartProductCell" wx:for="{{curShoppingCartData.goods_pool_list}}" wx:key="goodsPoolItem" data="{{index,item,isEditing,deleteAnimation,tempSku}}"></template>
</view>
<!-- 商品列表 -->
<block class="" wx:if="{{curShoppingCartData.goods_list.length}}">
<block wx:for="{{curShoppingCartData.goods_list}}" wx:for-item="goodsItem" wx:for-index="goodsIndex" wx:key="goodsitem">
<view class="poolGoodCellContainer">
<view class="cellLine" wx:if="{{goodsIndex > 0}}"></view>
<template is="shoppingCartOneProductCell" data="{{goodsItem,isEditing,deleteAnimation,tempSku}}"></template>
</view>
</block>
<view class="bottonGray"></view>
</block>
<!--加价购 & 赠品 -->
<block wx:if="{{curShoppingCartData.gGiftAndPriceGiftList.length}}">
<template is="shoppingCartGiftOrPriceCell" data="{{giftList:curShoppingCartData.gGiftAndPriceGiftList}}"></template>
</block>
<!--无效商品 -->
<block wx:if="{{curShoppingCartData.invalidGoodsList.length}}">
<template is="shoppingCartInvalidProductCell" data="{{invalidGoodsList:curShoppingCartData.invalidGoodsList,isEditing,deleteAnimation,tempSku}}"></template>
</block>
<!-- 已参与活动 -->
<block wx:if="{{curShoppingCartData.promotion_info.length}}">
<template is="shoppingCartPromotionCell" data="{{promotionList:curShoppingCartData.promotion_info}}"></template>
</block>
<!-- 总计价格 -->
<block wx:if="{{curShoppingCartData.shopping_cart_data}}">
<text class="totalCost">{{curShoppingCartData.shopping_cart_data.promotion_formula}}</text>
<view class="bottonGray"></view>
</block>
</scroll-view>
<!-- footer -->
<template is="shoppingCartFooterView" data="{{item:curShoppingCartData.shopping_cart_data,isSelectAll:curShoppingCartData.isValidGoodsSelectAll,isEditing}}"></template>
<template is="Picker" data="{{pickerData}}"/>
<import src="../../vendors/toast/wetoast.wxml"/>
<template is="wetoast" data="{{...__wetoast__}}"/>
</view>
<view wx:else>
<view class='empty-view'>
<image src='images/shoppingcart_empty@2x.png' class='shoppingcart-empty-icon'></image>
<text class='shoppingcart-empty-title'>购物车空空如也\n去挑选中意的商品</text>
<view class='shoppingcart-empty-btn' bindtap='navToNewArriaval'>去逛逛</view>
</view>
</view>