cart-item.hbs 5.35 KB
<li class="pre-sell-box tr
        {{#isChecked}}active{{/isChecked}}
        {{#inValid}}tr-disabled {{#unless sku}}tr-disabled-none{{/unless}}{{/inValid}}
        {{#isSamebrandWithNext}} tr-group {{/isSamebrandWithNext}}"
    data-role="pitem"
    {{#if isOffShelve}} data-isoffshelve="true"{{/if}}
    {{#if pid}} data-pid="{{pid}}"{{/if}}
    {{#if id}} data-id="{{id}}"{{/if}}
    {{#if skn}} data-skn="{{skn}}"{{/if}}
    {{#if sku}} data-sku="{{sku}}"{{/if}}
    {{#if productNum}} data-productnum="{{productNum}}"{{/if}}
    {{#if storageNum}} data-storagenum="{{storageNum}}"{{/if}}
    {{#if minBuyNumber}} data-minbuynum="{{minBuyNumber}}"{{/if}}
    {{#if goodsType}} data-goodstype="{{goodsType}}"{{/if}}
    data-promotionid="{{promotionId}}"
    data-color="{{productColor}}"
    data-size="{{productSize}}"
    data-pool-type="{{parent.poolType}}"
    {{#if isGift}} data-isgift="true"{{/if}}
    {{#if isPriceGift}} data-ispricegift="true"{{/if}}
    {{#if parent.batchNo}} data-batch-no="{{parent.batchNo}}"{{/if}}
    {{#if parent.poolId}} data-pool-id="{{parent.poolId}}"{{/if}} >
    <div class="pay-pro td {{#eq parent.poolType 3}} is-check{{/eq}}" style="width: 368px;">
        {{#unless isGift}}
            {{#if inValid}}
                <i class="cart-item-disabled iconfont"></i>
            {{else}}
                <i class="cart-item-check iconfont {{#isChecked}}cart-item-checked{{/isChecked}}"
                   data-role="cart-item-check"
                   data-goodstype="{{goodsType}}"
                   {{#isTipNoStore}}data-tipnostore="true"{{/isTipNoStore}}
                   {{#if isChecked}}checked{{/if}}></i>
            {{/if}}
        {{/unless}}

        <a class="pay-pro-icon"
            data-role="item-img"
            {{#unless isOffShelve}}href="{{link}}" target="_blank"{{/unless}}>
            <img src="{{imgCover}}">
            {{#if isAdvance}}<span class="incentive">预售</span>{{/if}}
        </a>
        <p class="pay-pro-info">
            <a {{#unless isOffShelve}}href="{{link}}" target="_blank"{{/unless}}
                data-role="item-title">
                {{#if tag}}<code class="good-mark">{{tag}}</code>{{/if}}{{productTitle}}
            </a>
            <em class="{{#unless isOffShelve}}pay-pro-detail{{/unless}}">
                <span>
                    <b title="{{productColor}}">颜色:{{productColor}}</b>
                    尺码:{{productSize}}<i class="iconfont">&#xe6c7;</i>
                </span>
            </em>
            {{#and isAdvance preSellDate}}
                <span class="presell">上市期:{{preSellDate}}</span>
            {{/and}}
            {{#eq parent.poolType 3}}
                {{#if isSoldOut}}
                    <span>
                        <b>已售罄</b>
                    </span>
                {{/if}}

                {{#and inValid storageNum}}
                    <span class="mark-bg-white cursor-p" data-role="readd2cart2">重新加入购物车</span>
                {{/and}}
            {{/eq}}
        </p>
    </div>
    <div class="product-price td" style="width:148px;">¥{{productPrice}}
        {{#isVipPrice}}
            <p class="tip-message">(VIP)</p>
        {{/isVipPrice}}
        {{#isStuPrice}}
            <p class="tip-message">(学生价)</p>
        {{/isStuPrice}}
        {{#if promotionInfos}}
            <div class="sale-info">
                <span class="sale-info-title">促销信息<i></i></span>
                <ul class="none">
                    {{#promotionInfos}}
                        <li data-role="promotion-wrap"
                            data-promotionid="{{promotionId}}">{{{promotionDesc}}}
                            {{>mix/cart/cart-promotion-btn}}
                            {{#if isNotReach}}
                                <a class="btn-clear blue order-pay-link" target="_blank" href="{{promotionPageUrl}}">&nbsp;&nbsp;去凑单&nbsp;</a>
                            {{/if}}
                        </li>
                    {{/promotionInfos}}
                </ul>
            </div>
        {{/if}}
    </div>
    <div style="width:128px;" class="adjust-cart-num td">
        {{#or isGift isPriceGift inValid}}
            <div>{{productNum}}</div>
        {{^}}
            <div class="cart-num-cont">
                <span class="minus cart-num-btn
                            {{#or (le productNum 1) (and minBuyNumber (le productNum minBuyNumber))}}disabled{{/or}}">
                    <i class="iconfont icon-minus"></i>
                </span>
                <input type="text" value="{{productNum}}" readonly="readonly"/>
                <span class="plus cart-num-btn {{#or isTipNoStore (ge productNum storageNum)}}disabled{{/or}}"><i class="iconfont icon-plus"></i></span>
            </div>

            <p class="tip-message {{#isTipNoStore}}tipNoStore{{/isTipNoStore}}">{{tipMessage}}</p>
        {{/or}}
    </div>
    <div style="width:160px;" class="sub-total red td">
        ¥{{productSubtotal}}
        {{#if yohoIcon}}
            <p class="tip-message tip-message-coin"><i class="yoho-coin"></i>{{yohoIcon}}有货币</p>
        {{/if}}
    </div>
    <div style="width:100px;" class="cart-operation td">
        {{#unless isBtnDisab}}
            <span class="cart-del-btn" data-role="cart-del-btn">删除</span>
            <span class="cart-col-btn" data-role="cart-mov2fav-btn">移入收藏</span>
        {{/unless}}
    </div>
</li>