Authored by hf

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -40,8 +40,8 @@ var $listNav = $('#list-nav'), @@ -40,8 +40,8 @@ var $listNav = $('#list-nav'),
40 navInfo = { 40 navInfo = {
41 newest: { 41 newest: {
42 order: 1, 42 order: 1,
43 - reload: false,  
44 - page: 1, 43 + reload: true,
  44 + page: 0,
45 end: false 45 end: false
46 }, 46 },
47 price: { 47 price: {
@@ -355,4 +355,7 @@ $brandHeader.children('.btn-col').bind('tap', function() { @@ -355,4 +355,7 @@ $brandHeader.children('.btn-col').bind('tap', function() {
355 tip.show('网络断开连接了~'); 355 tip.show('网络断开连接了~');
356 } 356 }
357 }); 357 });
358 -});  
  358 +});
  359 +
  360 +//初始请求最新第一页数据
  361 +search();
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}}
@@ -82,11 +82,7 @@ @@ -82,11 +82,7 @@
82 </li> 82 </li>
83 </ul> 83 </ul>
84 <div id="goods-container" class="goods-container"> 84 <div id="goods-container" class="goods-container">
85 - <div class="new-goods container clearfix">  
86 - {{# new}}  
87 - {{> good}}  
88 - {{/ new}}  
89 - </div> 85 + <div class="new-goods container clearfix"></div>
90 <div class="price-goods container clearfix hide"></div> 86 <div class="price-goods container clearfix hide"></div>
91 <div class="discount-goods container clearfix hide"></div> 87 <div class="discount-goods container clearfix hide"></div>
92 88