|
|
<wxs src="../../wxs/helper.wxs" module="helper" />
|
|
|
|
|
|
<import src="./template/cart/goods-pool.wxml"/>
|
|
|
<import src="./template/cart/goods-list.wxml"/>
|
|
|
<import src="./template/cart/gift-list.wxml"/>
|
|
|
<import src="./template/cart/invalid-list.wxml"/>
|
|
|
|
|
|
<block wx:if="{{isEmptyCart}}">
|
|
|
<view class="empty-cart">
|
|
|
<image src='../../static/images/empty_cart.png' class='empty-img'></image>
|
|
|
<text class='empty-desc'>购物车空空如也\n去挑选中意的商品</text>
|
|
|
<view class='shopping-btn' bindtap='goShopping'>去逛逛</view>
|
|
|
</view>
|
|
|
<view class="empty-cart">
|
|
|
<image src='../../static/images/empty_cart.png' class='empty-img'></image>
|
|
|
<text class='empty-desc'>购物车空空如也\n去挑选中意的商品</text>
|
|
|
<view class='shopping-btn' bindtap='goShopping'>去逛逛</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
<block wx:else>
|
|
|
<scroll-view scroll-y style="height: 100%;">
|
|
|
<view class="tips-wrap">
|
|
|
<view class="hold-text">
|
|
|
<text>{{priceDownTips || shippingCostTips}}</text>
|
|
|
<scroll-view scroll-y style="height: 100%;">
|
|
|
<view class="tips-wrap" wx:if="{{priceDownTips || shippingCostTips}}">
|
|
|
<view class="hold-text">
|
|
|
<text>{{priceDownTips || shippingCostTips}}</text>
|
|
|
</view>
|
|
|
<view wx:if="{{shippingCostTips || priceDownTips}}" class="fixed-top-tips">
|
|
|
<view wx:if="{{priceDownTips}}" class="price-down-tips">
|
|
|
<text>{{priceDownTips}}</text>
|
|
|
<text class="iconfont icon-top" bindtap='tapPriceDownTipsAction'></text>
|
|
|
</view>
|
|
|
<view wx:else class="shipping-cost-tips">{{shippingCostTips}}</view>
|
|
|
<view class="edit-cart-btn" bindtap="editCartAction">{{isEditing ? '完成' : '编辑商品'}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 商品池 -->
|
|
|
<template is="cartGoodsPool" data="{{goodsPoolList, isEditing}}"/>
|
|
|
|
|
|
<!-- 商品列表 -->
|
|
|
<view wx:if="{{goodsList}}">
|
|
|
<template is="cartGoodsList" data="{{goodsList, isEditing}}"/>
|
|
|
<view class="split-line"></view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 加价购&赠品 -->
|
|
|
<template is="cartGiftList" data="{{giftList: gGiftAndPriceGiftList}}"/>
|
|
|
|
|
|
<!-- 无效商品 -->
|
|
|
<template is="cartInvalidList" data="{{invalidGoodsList}}"/>
|
|
|
|
|
|
<!-- 已参与活动 -->
|
|
|
<view class="used-promotion" wx:if="{{promotionInfo}}">
|
|
|
<view class="promotion-title">已参与活动</view>
|
|
|
<block wx:for="{{promotionInfo}}" wx:key="unique">
|
|
|
<view class="promotion-item">• {{item.promotion_title}}</view>
|
|
|
</block>
|
|
|
</view>
|
|
|
|
|
|
<!-- 总计价格 -->
|
|
|
<block wx:if="{{shoppingCartData}}">
|
|
|
<view class="total-cost">{{shoppingCartData.promotion_formula}}</view>
|
|
|
<view class="split-line"></view>
|
|
|
|
|
|
<view class="footer-wrap">
|
|
|
<view class="footer-fixed">
|
|
|
<view class="select-all-btn">
|
|
|
<text class="iconfont icon-duihao-fill" wx:if="{{isSelectAll}}"></text>
|
|
|
<text class="iconfont icon-round" wx:else></text>
|
|
|
<text>全选</text>
|
|
|
</view>
|
|
|
<view class="settlement-block">
|
|
|
<view class="footer-total-cost">
|
|
|
<text class="cost">总计¥{{helper.round(shoppingCartData.last_order_amount)}}({{shoppingCartData.selected_goods_count}})件</text>
|
|
|
<text class="no-freight">不含运费</text>
|
|
|
</view>
|
|
|
<view wx:if="{{shippingCostTips || priceDownTips}}" class="fixed-top-tips">
|
|
|
<view wx:if="{{priceDownTips}}" class="price-down-tips">
|
|
|
<text>{{priceDownTips}}</text>
|
|
|
<text class="iconfont icon-top" bindtap='tapPriceDownTipsAction'></text>
|
|
|
</view>
|
|
|
<view wx:else class="shipping-cost-tips">{{shippingCostTips}}</view>
|
|
|
<view class="edit-cart-btn" bindtap="editCartAction">{{isEditing ? '完成' : '编辑商品'}}</view>
|
|
|
<view class="payment-btn" bindtap="paymentAction" style="{{shoppingCartData.selected_goods_count > 0 ? '' : 'background-color: #b0b0b0'}}">
|
|
|
<text>结算</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
|
|
|
<template is="cartGoodsPool" data="{{goodsPoolList}}"/>
|
|
|
|
|
|
</scroll-view>
|
|
|
</scroll-view>
|
|
|
</block> |
...
|
...
|
|