goods.hbs 2.53 KB
{{#if this}} {{!-- 剔除值为false的项 --}}
    <div class="good-info {{#if @root.saleViplogin}}sale-vip{{/if}}" data-id="{{product_skn}}" data-bp-id="guang_goodList_{{product_name}}_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}}
                {{# isYohood}}
                    <p class="good-tag new-festival-tag">新品节</p>
                {{/ isYohood}}
                {{# 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 default_images 235 314}}">
            </a>
            {{# is_soon_sold_out}}
                <p class="few-tag">即将售罄</p>
            {{/ is_soon_sold_out}}

            {{#if noStorage}}
                <div class="no-storage">
                    <div class="no-storage-img"></div>
                </div>
            {{/if}}
        </div>
        <div class="good-detail-text">
            <div class="name">
                <a href="{{url}}">{{product_name}}</a>
            </div>
            <div class="price">
                {{#if @root.saleViplogin}}
                    <i class="vip-grade vip-grade-{{@root.vipLevel}}"></i>
                    <span class="sale-price {{^market_price}}no-price{{/market_price}}">¥
                        {{#if @root.vipPrice1}}{{round vip1_price}}{{/if}}
                        {{#if @root.vipPrice2}}{{round vip2_price}}{{/if}}
                        {{#if @root.vipPrice3}}{{round vip3_price}}{{/if}}
                    </span>
                {{else}}
                    <span class="sale-price {{^market_price}}no-price{{/market_price}}">¥{{round sales_price}}</span>
                {{/if}}
                {{#market_price}}
                    <span class="market-price">¥{{round .}}</span>
                {{/market_price}}
            </div>
            {{#if @root.saleVip}}
                <div class="vip-info">
                    <i class="vip-icon"></i>更优惠
                </div>
            {{/if}}
        </div>
    </div>
{{/if}}