goods.hbs 2.35 KB
{{#if this}} {{!-- 剔除值为false的项 --}}
    <div class="good-info {{#if @root.saleViplogin}}sale-vip{{/if}}" data-id="{{productSkn}}" data-bp-id="guang_goodList_{{productName}}_false">
        <div class="tag-container clearfix">
            {{# tags}}
                {{# isNew}}
                    <p class="good-tag new-tag">NEW</p>
                {{/ isNew}}
                {{# isAdvance}}
                    <p class="good-tag renew-tag">再到着</p>
                {{/ isAdvance}}
                {{# isDiscount}}
                    <p class="good-tag sale-tag">SALE</p>
                {{/ isDiscount}}
                {{# isYohoood}}
                    <p class="good-tag running-man-tag">跑男同款</p>
                {{/ isYohoood}}
                {{# isLimited}}
                    <p class="good-tag limit-tag">限量商品</p>
                {{/ isLimited}}
            {{/ tags}}
        </div>
        <div class="good-detail-img">
            <a class="good-thumb" href="{{url}}">
                <img class="lazy" data-original="{{image defaultImages 235 314}}">
            </a>
            {{# isSoonSoldOut}}
                <p class="few-tag">即将售罄</p>
            {{/ isSoonSoldOut}}
        </div>
        <div class="good-detail-text">
            <div class="name">
                <a href="{{url}}">{{productName}}</a>
            </div>
            <div class="price">
                {{#if @root.saleViplogin}}
                    <i class="vip-grade vip-grade-{{@root.vipLevel}}"></i>
                    <span class="sale-price {{^marketPrice}}no-price{{/marketPrice}}">¥
                        {{#if @root.vipPrice1}}{{round vip1Price}}{{/if}}
                        {{#if @root.vipPrice2}}{{round vip2Price}}{{/if}}
                        {{#if @root.vipPrice3}}{{round vip3Price}}{{/if}}
                    </span>
                {{else}}
                    <span class="sale-price {{^marketPrice}}no-price{{/marketPrice}}">¥{{round salesPrice}}</span>
                {{/if}}
                {{#marketPrice}}
                    <span class="market-price">¥{{round .}}</span>
                {{/marketPrice}}
            </div>
            {{#if @root.saleVip}}
                <div class="vip-info">
                    <i class="vip-icon"></i>更优惠
                </div>
            {{/if}}
        </div>
    </div>
{{/if}}