detail.hbs 8.95 KB
{{# result}}
<div class="good-detail-page yoho-page">
    <div class="banner-container">
        <div class="tag-container">
            {{# tags}}
                {{# is_new}}
                    <p class="good-tag new-tag">NEW</p>
                {{/ is_new}}
                {{# is_advance}}
                    <p class="good-tag renew-tag">再到着</p>
                {{/ is_advance}}
                {{# is_discount}}
                    <p class="good-tag sale-tag">SALE</p>
                {{/ is_discount}}
                {{# is_yohood}}
                    <p class="good-tag new-festival-tag">新品节</p>
                {{/ is_yohood}}
                {{# is_limited}}
                    <p class="good-tag limit-tag">限量商品</p>
                {{/ is_limited}}
                {{# is_soon_sold_out}}
                    <p class="good-tag soon-sold-out-tag">即将售罄</p>
                {{/ is_soon_sold_out}}
            {{/ tags}}
        </div>
        {{# bannerTop}}
        {{> detail/banner-swiper-arrow}}
        {{/ bannerTop}}
    </div>
    {{# goodsName}}
    <h2 class="goods-name"><span>{{.}}</span></h2>
    {{/ goodsName}}

    {{# goodsSubtitle}}
    <h1 class="goods-subtitle"><span>{{.}}</span></h1>
    {{/ goodsSubtitle}}

    <div class="price-date">
        {{# goodsPrice}}
        <div class="goods-price">
            {{#if ../isSecKill/secKillPrice}}
            <h1 class="current-price">{{../isSecKill/secKillPrice}}</h1>
            {{else}}
            <h1 class="current-price">{{currentPrice}}</h1>
            {{/if}}
            <h1 class="previous-price">{{previousPrice}}</h1>
        </div>
        {{/ goodsPrice}}

        {{^ noLimitGoodsBtn}}
            {{#if canGetLimitCode}}
                <button class="limit-sale" id='limit-sale'>获取限购码</button>
            {{/if}}

            {{#if codeEmpty}}
                <button class="got-limit-sale">限购码已被抢光</button>
            {{/if}}

            {{#if gotCode}}
                <button class="got-limit-sale">已获取限购码</button>
            {{/if}}
        {{/noLimitGoodsBtn}}

        {{#if periodOfMarket}}
        <div class="period-of-market">
            <h1>上市期:</h1>
            <h1 >{{periodOfMarket}}</h1>
        </div>
        {{/if}}
        {{#isSecKill}}
        {{#if startIng}}
        <div class="seckill-time seckill-time-border">
            <span>距结束 </span>
            <span class="end-time">
                <i class="tick hour">00</i>:
                <i class="tick minute">00</i>:
                <i class="tick second">00</i>
            </span>
        </div>
        {{/if}}
        {{#if notStart}}
        <div class="seckill-time notStart">
            <span class="seckill-time-pic">秒杀预告</span>
            <span class="seckill-time-c">月日</span>
        </div>
        {{/if}}
        {{/isSecKill}}
    </div>

    {{#if studentPrice}}
        <div class="price-date">
            <div class="student-price">
                <i class="student-name">学生价</i><span class="student-value">¥{{round studentPrice}}</span>
            </div>
        </div>
    {{/if}}

    {{!-- {{#if studentCoinNum}}
        <div class="price-date">
            <div class="student-price">
                <i class="student-name">返</i> 学生返币{{ studentCoinNum}}个
            </div>
        </div>
    {{else}}
        {{#commodityReturn}}
            <div class="price-date">
                <div class="student-price">
                    <i class="student-name">返</i> 返{{studentCoinNum}}个YOHO币
                </div>
            </div>
        {{/commodityReturn}}
    {{/if}} --}}

    {{#unless studentPrice}}
        {{# vipLevel}}
            <ul class="vip-level clearfix">
                {{# list}}
                    <li class="icons-item {{#if currentLevel}}current-level{{/if}}">
                <span class="vip-img " style="background-size:contain;">
                </span>
                        <span class="vip-price ">{{text}}</span>
                    </li>
                {{/ list}}
            </ul>
        {{/ vipLevel}}
    {{/unless}}




    {{# goodsDiscount}}
    <div class="goods-discount" id="goodsDiscount">
        {{# list}}
            {{#if @first}}
                {{#if text}}
                <h1 class="first-item short-text tap-hightlight">{{text}}<span class="icon-down iconfont dropdown">&#xe609;</span></h1>
                {{/if}}
            {{/if}}
        {{/ list}}
        <div class="discount-folder">
        {{# list}}
            {{#if @first}}
            {{else}}
                {{#if text}}
                <h1 class="folder-item tap-hightlight">{{text}}</h1>
                {{/if}}
            {{/if}}
        {{/list}}
        </div>
    </div>
    {{/ goodsDiscount}}

    {{# feedbacks}}
    <div class="feedback-list ">
        {{#if commentsNum}}
            {{> detail/feedback-tab}}
        {{else}}
            {{#if consultsNum}}
                {{> detail/feedback-tab}}
            {{else}}
                <div class="nodata tap-hightlight" id="goto-consult">
                <span>暂无商品评价和咨询</span>
                <a href="{{consultsUrl}}" class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>
                </div>
            {{/if}}
        {{/if}}
    </div>
    {{/ feedbacks}}

    {{# enterStore}}
    <div id="enter-store" class="enter-store page-block tap-hightlight">
        <a class="store-logo" href="{{url}}" style="">
            <img class="lazy" data-original="{{image img 47 47}}" alt="{{storeName}}">
        </a>
        <a class="store-name" href="{{url}}">{{storeName}}</a>
        <a class="store-link" href="{{url}}">进入店铺<span class="iconfont">&#xe604;</span></a>
    </div>
    {{/ enterStore}}

    <div id="productDesc"> </div>
    {{> detail/recommend-for-you}}
    {{> cart/chose-panel}}
    {{# isSecKill}}
    {{# notStart}}
    <div class="seckill-count">
        <div class="seckill-count-bg"></div>
        <div class="seckill-count-num">距秒杀开始:
            <i class="tick hour">00</i>
            <i class="tick minute">00</i>
            <i class="tick second">00</i>
        </div>
    </div>
    {{/notStart}}
    {{/isSecKill}}
    {{#cartInfo}}
    <div class="cart-bar">
        <a href="{{cartUrl}}" class="num-incart iconfont"><span class="num-tag hide"></span>&#xe62c;</a>
        {{#if ../isSecKill/noneLeft}}
            <a href="javascript:;" class="sold-out">已售罄</a>
        {{else if ../isSecKill/startIng}}
            <a href="javascript:;" id="addtoCart" class="addto-cart">立即购买</a>
        {{else if ../isSecKill/notStart}}
            <a href="javascript:;" class="sold-out">即将开抢</a>
        {{else}}
            {{#if addToCartUrl}}
               <a id="addtoCart" href="javascript:;" class="addto-cart">{{#if ../tickets}}立即购买{{else}}加入购物车{{/if}}</a>
            {{/if}}

            {{#if soldOut}}
                <a href="javascript:;" class="sold-out">已售罄</a>
            {{/if}}

            {{#if notForSale}}
                <a href="javascript:;" class="sold-out">非卖品</a>
            {{/if}}

            {{#if limitNotForSale}}
                <a href="javascript:;" class="sold-out limit">即将发售</a>
            {{/if}}

            {{#if canBuyLimit}}
                <a href="javascript:;" id="addtoCart" class="addto-cart">立即购买</a>
            {{/if}}

            {{#if noLimitCode}}
                <a 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}}">

            {{#limitProductCode}}
                <input type="hidden" id="limitProductCode" name="limitProductCode" value="{{.}}">
            {{/limitProductCode}}

        {{/if}}
        <a href="javascript:;" id="likeBtn" class="favorite iconfont {{#isCollect}}liked{{/isCollect}}">&#xe605;</a>
    </div>
    {{/cartInfo}}
    {{#if introUrl}}
    <input id="introUrl" type="hidden" value="{{introUrl}}">
    {{/if}}
    {{#if id}}
    <input id="productId" type="hidden" value="{{id}}">
    {{/if}}
    {{#if preferenceUrl}}
    <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}">
    {{/if}}

    <input id="productSkn" type="hidden" value="{{productSkn}}">

    {{#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>
    {{/if}}

    {{#if showPannel}}
        <input type="hidden" id="showPannel" value="1">
    {{/if}}

</div>
    {{# isSecKill}}
    <input type="hidden" class="productSkn-text" value={{productSkn}} />
    {{/isSecKill}}
{{/ result}}