Authored by Rock Zhang

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

@@ -63,6 +63,11 @@ @@ -63,6 +63,11 @@
63 //header 63 //header
64 { 64 {
65 pageHeader: { 65 pageHeader: {
  66 + //页面主题标识
  67 + boys: true,
  68 + girls: true,
  69 + kids: true,
  70 + lifeStyle: true,
66 //对应页面有就传,没有就不传 71 //对应页面有就传,没有就不传
67 navBack: true, 72 navBack: true,
68 navTitle: '', 73 navTitle: '',
@@ -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();
@@ -7,6 +7,22 @@ @@ -7,6 +7,22 @@
7 height: 88rem / $pxConvertRem; 7 height: 88rem / $pxConvertRem;
8 line-height: 88rem / $pxConvertRem; 8 line-height: 88rem / $pxConvertRem;
9 9
  10 + &.boys {
  11 + @include background-image(linear-gradient(#323232, #414141));
  12 + }
  13 +
  14 + &.girls {
  15 + background: #ff88ae;
  16 + }
  17 +
  18 + &.kids {
  19 + background: #7ad9f9;
  20 + }
  21 +
  22 + &.life-style {
  23 + background: #4f4138;
  24 + }
  25 +
10 .nav-back { 26 .nav-back {
11 position: absolute; 27 position: absolute;
12 left: 34rem / $pxConvertRem; 28 left: 34rem / $pxConvertRem;
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}}
@@ -10,7 +10,13 @@ @@ -10,7 +10,13 @@
10 </ul> 10 </ul>
11 11
12 <div id="goods-list"> 12 <div id="goods-list">
13 - {{> product/goods_container}} 13 + {{# goodsContainer}}
  14 + <div class="goods-list {{^show}}hide{{/show}}">
  15 + {{# goods}}
  16 + {{> good}}
  17 + {{/ goods}}
  18 + </div>
  19 + {{/ goodsContainer}}
14 </div> 20 </div>
15 21
16 <div id="load-more-info" class="load-more-info"> 22 <div id="load-more-info" class="load-more-info">
@@ -19,6 +25,4 @@ @@ -19,6 +25,4 @@
19 </div> 25 </div>
20 <span class="no-more status hide">没有更多啦</span> 26 <span class="no-more status hide">没有更多啦</span>
21 </div> 27 </div>
22 -</div>  
23 -  
24 -  
  28 +</div>
1 {{#pageHeader}} 1 {{#pageHeader}}
2 -<header class="yoho-header"> 2 +<header class="yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}">
3 {{#if navBack}} 3 {{#if navBack}}
4 <a href="javascript:history.go(-1);" class="nav-back"></a> 4 <a href="javascript:history.go(-1);" class="nav-back"></a>
5 {{/if}} 5 {{/if}}
1 -{{# goodsContainer}}  
2 - <div class="goods-list {{^show}}hide{{/show}}">  
3 - {{# goods}}  
4 - {{> good}}  
5 - {{/ goods}}  
6 - </div>  
7 -{{/ goodsContainer}}  
@@ -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