{{#each blocks as block index }} <div class="grid size160{{#if ( blocks.length - 1 === index )}} last-grid{{/if}}{{#if ( block.list.length == 0 )}} hidden{{/if}}"> <div class="hd"> <h4><span>{{block.title}}</span></h4> </div> <div class="bd"> <ul class="items clear-fix"> {{#each block.list as d i}} {{#if (i < 4)}} <li class="item-wrap"> <dl class="item"> <dt class="pic"> <a target="_blank" href="{{d.url}}"> <img src="{{d.pic}}"> </a> </dt> <dd class="detail-info"> <p class="title"> <a target="_blank" href="{{d.url}}" class="permalink">{{d.name}}</a> </p> <p class="price"> <span class="after-discount"> <span class="symbol">¥</span><span class="value">,,,,,,,,,,,,,,, {{#if d.promotionPrice}} {{new Number(d.promotionPrice).toFixed(2)}} {{#else}} {{new Number(d.price).toFixed(2)}} {{/if}},,,,,,,,,,,,,,, </span> </span>,,,,,,,,,,,,,,,,,,,,,,,,, {{#if d.promotionPrice}} <span class="original"><span class="symbol">¥</span><span class="value">{{new Number(d.price).toFixed(2)}}</span></span> {{/if}},,,, </p> </dd> </dl> </li> {{/if}} {{/each}} </ul> </div> </div> {{/each}}