chose-panel.hbs 4.6 KB
{{# cartInfo}}
<div class="chose-panel" data-skn="{{productSkn}}">
    <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 {{#if discountBuy}}discount-gray{{/if}}" href="javascript:void(0);">
                            <span class="iconfont {{#if ../promotionId}}disabled{{/if}}">&#xe625;</span>
                        </a>
                        <input id="good-num" class="good-num disabled" type="text" {{#if discountBuy}}value="{{discountBuy.num}}" {{^}} value="1"{{/if}} disabled="true">
                        <a class="btn btn-plus" href="javascript:void(0);">
                            <span class="iconfont {{#if ../promotionId}}disabled{{/if}}">&#xe624;</span>
                        </a>
                    </div>
                    {{#if discountBuy}}
                    <input id="mnum" type="hidden" value="{{discountBuy.num}}">
                        {{#if discountBuy.discount}}
                        <span class="left-num-discount" style="color: #e10;position: absolute;top: 0.5rem;left: 9.5rem;overflow: hidden;white-space: nowrap;width: 5.2rem;-o-text-overflow: ellipsis;text-overflow: ellipsis;">{{discountBuy.num}}件起购享{{discountBuy.discount}}</span>
                        {{^}}
                        <span class="left-num-discount" style="color: #e10;position: absolute;top: 0.5rem;left: 9.5rem;overflow: hidden;white-space: nowrap;width: 5.2rem;-o-text-overflow: ellipsis;text-overflow: ellipsis;">{{discountBuy.num}}件起购</span>
                        {{/if}}
                    {{^}}
                    <span class="left-num"></span>
                    {{/if}}
                    <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>
</div>
{{/ cartInfo}}
<input id="promotionId" type="hidden" value="{{promotionId}}">
<input id="single" type="hidden" value="{{@root.single}}">