good.hbs 2.52 KB

{{#if .}} {{!-- 剔除值为false的项 --}}
    <div class="good-info" data-id="{{id}}">
        <div class="tag-container clearfix">
            {{# 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_presell}}
                    <p class="good-tag is-presell">预售</p>
                {{/ is_presell}}
            {{/ tags}}
        </div>
        <div class="good-detail-img">
            <a class="good-thumb buriedpoint" href="{{url}}"  data-bp-id="shop_good_{{thumb}}_0">
                <img src="{{thumb}}">
            </a>
            {{# is_soon_sold_out}}
                <p class="few-tag ">即将售罄</p>
            {{/ is_soon_sold_out}}

            {{# is_solded}}
                <p class="out-tag">已售罄</p>
            {{/ is_solded}}
            {{#if similar}}
            <div class="similar-c">
                <div class="bg"></div>
                <a href="//m.yohobuy.com/product/similar?skn={{id}}">找相似</a>
            </div>
            {{/if}}
        </div>
        <div class="good-detail-text">
            <div class="name">
                <a href="{{url}}">{{name}}</a>
            </div>
            <div class="price {{#if students}}student-price{{/if}}">
                {{#if students}}
                    <span class="sale-price {{^price}}no-price{{/price}}">¥{{studentPrice}}</span>
                    <span class="students-price-tag"></span>
                    {{#salePrice}}
                        <span class="market-price">¥{{.}}</span>
                    {{/salePrice}}
                {{^}}
                    <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span>
                    {{#price}}
                        <span class="market-price">¥{{.}}</span>
                    {{/price}}
                {{/if}}
            </div>
            {{#if similar}}
            <a class="similar-btn iconfont">&#xe606;</a>
            {{/if}}
        </div>
    </div>
{{/if}}