infodata.hbs 5.71 KB
{{# cartInfo}}
<div class="chose-panel">
    <div class="main">
        <div class="infos {{#if @root.tickets}} tickets-info {{/if}}">
            <div class="basic-info" >
                {{#each thumbs}}
                    <img class="thumb {{#unless @first}}hide{{/unless}}" src="{{image2 img q=60}}">
                {{/each}}
                <div class="text-info">
                    <p class="name">{{name}}</p>
                    <p class="price">
                        {{#if price}}
                            <span class="sale-price">{{salePrice}}</span>
                            <span class="market-price">{{price}}</span>
                        {{else}}
                            {{# isY isSecKill}}
                                <span class="sale-price">{{salePrice}}</span>
                                <span class="market-price">{{salePrice}}</span>
                            {{else}}
                                <span class="sale-price no-price">{{salePrice}}</span>
                            {{/ isY}}
                        {{/if}}
                    </p>
                </div>
            </div>
            <div class="chose-items">
                <div class="color-list block-list">
                    <span class="name">{{#if @root.tickets}}日期{{else}}颜色{{/if}}</span>
                    {{#each colors}}
                        <ul id="{{id}}" data-index="{{@index}}" class="size-row clearfix {{#unless @first}}hide{{/unless}}">
                            {{#each color}}
                            <li class="block {{#if chosed}} chosed{{/if}} {{#unless colorNum}} zero-stock{{/unless}}" data-num="{{colorNum}}">{{name}}</li>
                            {{/each}}
                        </ul>
                    {{/each}}
                </div>
                <div class="size-list block-list {{#if @root.single}} hide{{/if}}">
                    <span class="name">{{#if @root.tickets}}区域{{else}}尺码{{/if}}</span>
                    {{#each sizes}}
                        <ul class="size-row clearfix {{#unless @first}}hide{{/unless}}">
                            {{#each size}}
                            <li class="block {{#if chosed}} chosed{{/if}} {{#unless sizeNum}} zero-stock {{/unless}}" data-num="{{sizeNum}}" data-id="{{id}}" data-skuid="{{skuId}}">{{name}}</li>
                            {{/each}}
                        </ul>
                    {{/each}}
                </div>
                <div class="num">
                    <span class="name">数量</span>
                    <div class="clearfix">
                        <a class="btn btn-minus" href="javascript:void(0);">
                            <span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe625;</span>
                        </a>
                        <input id="good-num" class="good-num disabled" type="text" value="1" disabled="true">
                        <a class="btn btn-plus" href="javascript:void(0);">
                            <span class="iconfont {{#if promotionId}}disabled{{/if}}">&#xe624;</span>
                        </a>
                    </div>
                    <span class="left-num"></span>
                    <input id="left-num" type="hidden" value="0">
                    <input id="limitNum" type="hidden" value="{{limit}}">
                </div>
            </div>
        </div>
        <div class="btn-wrap">
            <button id="chose-btn-sure" class="btn btn-sure">{{#if @root.tickets}}立即购买{{else}}加入购物车{{/if}}</button>
        </div>
    </div>
    <input id="promotionId" type="hidden" value="{{promotionId}}">
    <input id="single" type="hidden" value="{{@root.single}}">
</div>
<div class="cart-bar">
    {{#unless @root.wap.common.removeCartCount}}
        <input type="hidden" id="remove-cart-count" value="1">
    {{/unless}}
    <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag {{#unless @root.cartCount}}hide{{/unless}}">{{@root.cartCount}}</span>&#xe62c;</a>
    {{#if addToCartUrl}}
        <a id="addtoCart" href="javascript:;" class="addto-cart add-to-cart-url">{{#if tickets}}立即购买{{else}}加入购物车{{/if}}</a>
    {{/if}}
    {{#if soldOut}}
        <a id="soldOut" href="javascript:;" class="sold-out">已售罄</a>
    {{/if}}
    {{#if notForSale}}
        <a id="notForSale" href="javascript:;" class="sold-out">非卖品</a>
    {{/if}}
    {{#if limitNotForSale}}
        <a id="limitNotForSale" href="javascript:;" class="sold-out limit">即将发售</a>
    {{/if}}
    {{#if preSale}}
        <a id="preSale" href="javascript:;" class="sold-out limit">即将开售</a>
    {{/if}}
    {{#if canBuyLimit}}
        <a href="javascript:;" id="addtoCart" class="addto-cart can-buy-limit">立即购买</a>
    {{/if}}
    {{#if canNotBuy}}
        <a href="javascript:;" class="addto-cart can-not-buy">立即购买</a>
    {{/if}}
    {{#if noLimitCode}}
        <a id="noLimitCode" href="javascript:;" class="sold-out limit">立即购买</a>
    {{/if}}

    <input type="hidden" id="limitCodeUrl" name="limitCodeUrl" value="{{limitCodeUrl}}">
    <input type="hidden" id="limitProductPay" name="limitProductPay" value="{{limitProductPay}}">
    {{#if limitProductCode}}
        <input type="hidden" id="limitProductCode" name="limitProductCode" value="{{limitProductCode}}">
    {{/if}}
    <a href="javascript:;" id="likeBtn" class="favorite iconfont {{#if @root.isCollect}}liked{{/if}}">&#xe605;</a>
</div>
{{/ cartInfo}}

{{#if loginUrl}}
<input type="hidden" name="loginUrl" id="loginUrl" value="{{loginUrl}}">
{{/if}}

{{# tickets}}
<form id="buyNowForm" method="post" action="{{ticketsConfirm}}">
    <input type="hidden" name="productSku" id="productSku">
    <input type="hidden" name="buyNumber" id="buyNumber">
</form>
{{/ tickets}}