index.hbs 1.78 KB
{{#if isEmptyCart}}
<div class="cart-zero">
    <i class="iconfont">&#xe640;</i>
    <p>您的购物车暂无商品</p>
    <a href="/product/new">随便逛逛</a>
</div>
{{^}}
    <div class="cart-nav clearfix{{#if cartNav}} more{{/if}}">
        {{#if commonGoodsCount}}
        <div class="nav-item{{#if ordinaryCart}} active{{/if}}" id="common-cart-nav" data-type="ordinary">
            <span>普通商品({{commonGoodsCount}})</span>
        </div>
        {{/if}}
        {{#if presellGoodsCount}}
        <div class="nav-item{{#if advanceCart}} active{{/if}}" id="presell-cart-nav" data-type="advance">
            <span >预售商品({{presellGoodsCount}})</span>
            <div id="presell-tip" class="presell-tip hide">
                <div class="triangle"></div>
                <p class="pt-content">预售商品点这里结算哦~</p>
            </div>
        </div>
        {{/if}}
        <button class="btn-edit"></button>
    </div>
   
    {{#if ordinaryCart}}
    <div class="cart-content normal-good active">
        {{#commonCart}}
            {{#if shipCost.shippingTip}}
                <div class="tips">
                    {{shipCost.shippingTip}}
                </div>
            {{/if}}
            {{> cart-content}}
        {{/commonCart}}
    </div>
    {{/if}}
    {{#if advanceCart}}
    <div class="cart-content advance-good active">
        <p class="presell-info">
            <span class="iconfont">&#xe61a;</span>
            <span class="txt">由于商品上市期不同,先到的将先发货</span>
            <span class="txt">预售商品不参加活动,不可使用优惠券</span>
        </p>
        {{#preSellCart}}
            {{> cart-content}}
        {{/preSellCart}}
    </div>
    {{/if}}
    <input id="cartType" type="hidden" value="{{cartType}}">
{{/if}}