good info filter false
Showing
1 changed file
with
39 additions
and
37 deletions
1 | -<div class="good-info" data-id="{{id}}"> | ||
2 | - <div class="tag-container clearfix"> | ||
3 | - {{# tags}} | ||
4 | - {{# is_new}} | ||
5 | - <p class="good-tag new-tag">NEW</p> | ||
6 | - {{/ is_new}} | ||
7 | - {{# is_advance}} | ||
8 | - <p class="good-tag renew-tag">再到着</p> | ||
9 | - {{/ is_advance}} | ||
10 | - {{# is_discount}} | ||
11 | - <p class="good-tag sale-tag">SALE</p> | ||
12 | - {{/ is_discount}} | ||
13 | - {{# is_yohoood}} | ||
14 | - <div class="good-tag yohood-tag"></div> | ||
15 | - {{/ is_yohoood}} | ||
16 | - {{# is_limited}} | ||
17 | - <p class="good-tag limit-tag">限量商品</p> | ||
18 | - {{/ is_limited}} | ||
19 | - {{/ tags}} | ||
20 | - </div> | ||
21 | - <div class="good-detail-img"> | ||
22 | - <a class="good-thumb" href="{{url}}"> | ||
23 | - <img class="lazy" data-original="{{thumb}}"> | ||
24 | - </a> | ||
25 | - {{# is_soon_sold_out}} | ||
26 | - <p class="few-tag">即将售罄</p> | ||
27 | - {{/ is_soon_sold_out}} | ||
28 | - </div> | ||
29 | - <div class="good-detail-text"> | ||
30 | - <div class="name"> | ||
31 | - <a href="{{url}}">{{name}}</a> | 1 | +{{#if .}} {{!-- 剔除值为false的项 --}} |
2 | + <div class="good-info" data-id="{{id}}"> | ||
3 | + <div class="tag-container clearfix"> | ||
4 | + {{# tags}} | ||
5 | + {{# is_new}} | ||
6 | + <p class="good-tag new-tag">NEW</p> | ||
7 | + {{/ is_new}} | ||
8 | + {{# is_advance}} | ||
9 | + <p class="good-tag renew-tag">再到着</p> | ||
10 | + {{/ is_advance}} | ||
11 | + {{# is_discount}} | ||
12 | + <p class="good-tag sale-tag">SALE</p> | ||
13 | + {{/ is_discount}} | ||
14 | + {{# is_yohoood}} | ||
15 | + <div class="good-tag yohood-tag"></div> | ||
16 | + {{/ is_yohoood}} | ||
17 | + {{# is_limited}} | ||
18 | + <p class="good-tag limit-tag">限量商品</p> | ||
19 | + {{/ is_limited}} | ||
20 | + {{/ tags}} | ||
21 | + </div> | ||
22 | + <div class="good-detail-img"> | ||
23 | + <a class="good-thumb" href="{{url}}"> | ||
24 | + <img class="lazy" data-original="{{thumb}}"> | ||
25 | + </a> | ||
26 | + {{# is_soon_sold_out}} | ||
27 | + <p class="few-tag">即将售罄</p> | ||
28 | + {{/ is_soon_sold_out}} | ||
32 | </div> | 29 | </div> |
33 | - <div class="price"> | ||
34 | - <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | ||
35 | - {{#price}} | ||
36 | - <span class="market-price">¥{{.}}</span> | ||
37 | - {{/price}} | 30 | + <div class="good-detail-text"> |
31 | + <div class="name"> | ||
32 | + <a href="{{url}}">{{name}}</a> | ||
33 | + </div> | ||
34 | + <div class="price"> | ||
35 | + <span class="sale-price {{^price}}no-price{{/price}}">¥{{salePrice}}</span> | ||
36 | + {{#price}} | ||
37 | + <span class="market-price">¥{{.}}</span> | ||
38 | + {{/price}} | ||
39 | + </div> | ||
38 | </div> | 40 | </div> |
39 | </div> | 41 | </div> |
40 | -</div> | 42 | +{{/if}} |
-
Please register or login to post a comment