Authored by unknown

男首数据结构、模板修改

1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="home-page yoho-page"> 2 <div class="home-page yoho-page">
3 {{# boy}} 3 {{# boy}}
  4 +
  5 + {{! 头部banner}}
  6 + {{# slide}}
4 <div class="slide-container"> 7 <div class="slide-container">
5 - {{#if bigSlide}}  
6 <div class="big-slide"> 8 <div class="big-slide">
7 <ul> 9 <ul>
8 {{# bigSlide}} 10 {{# bigSlide}}
@@ -22,7 +24,6 @@ @@ -22,7 +24,6 @@
22 </a> 24 </a>
23 </div> 25 </div>
24 </div> 26 </div>
25 - {{/if}}  
26 27
27 {{#if smallSlide}} 28 {{#if smallSlide}}
28 <div class="small-slide"> 29 <div class="small-slide">
@@ -37,6 +38,9 @@ @@ -37,6 +38,9 @@
37 </div> 38 </div>
38 {{/if}} 39 {{/if}}
39 </div> 40 </div>
  41 + {{/ slide}}
  42 +
  43 + {{! 新品速报}}
40 {{# newReport}} 44 {{# newReport}}
41 <div class="new-report clearfix"> 45 <div class="new-report clearfix">
42 {{> index/floor_header}} 46 {{> index/floor_header}}
@@ -46,7 +50,7 @@ @@ -46,7 +50,7 @@
46 {{#unless @last}} 50 {{#unless @last}}
47 <li> 51 <li>
48 <a href="{{href}}"> 52 <a href="{{href}}">
49 - <img src="{{img}}" alt=""> 53 + <img class="lazy" data-original="{{img}}" alt="">
50 </a> 54 </a>
51 </li> 55 </li>
52 {{/unless}} 56 {{/unless}}
@@ -57,13 +61,15 @@ @@ -57,13 +61,15 @@
57 {{#if @last}} 61 {{#if @last}}
58 <div class="last-item"> 62 <div class="last-item">
59 <a href="{{href}}"> 63 <a href="{{href}}">
60 - <img src="{{img}}" alt=""> 64 + <img class="lazy" data-original="{{img}}" alt="">
61 </a> 65 </a>
62 </div> 66 </div>
63 {{/if}} 67 {{/if}}
64 {{/ list}} 68 {{/ list}}
65 </div> 69 </div>
66 {{/ newReport}} 70 {{/ newReport}}
  71 +
  72 + {{! 优选品牌}}
67 {{# preferenceBrand}} 73 {{# preferenceBrand}}
68 <div class="preference-brand"> 74 <div class="preference-brand">
69 {{> index/floor_header}} 75 {{> index/floor_header}}
@@ -5,13 +5,14 @@ @@ -5,13 +5,14 @@
5 */ 5 */
6 6
7 var $ = require('jquery'), 7 var $ = require('jquery'),
8 - Handlebars = require('yoho.handlebars'); 8 + Handlebars = require('yoho.handlebars'),
  9 + lazyload = require('yoho.lazyload');
9 10
10 require('../common/linkage-slider'); 11 require('../common/linkage-slider');
11 require('../common/slider2'); 12 require('../common/slider2');
12 require('../common/newArrivls'); 13 require('../common/newArrivls');
13 14
14 - 15 +lazyload($('img.lazy'));
15 $('.slide-container').linkageSlider(); 16 $('.slide-container').linkageSlider();
16 $('.img-brand').slider2(); 17 $('.img-brand').slider2();
17 18
@@ -118,6 +118,8 @@ @@ -118,6 +118,8 @@
118 .new-report { 118 .new-report {
119 img { 119 img {
120 display: block; 120 display: block;
  121 + width: 100%;
  122 + height: 100%;
121 } 123 }
122 .report-list { 124 .report-list {
123 float: left; 125 float: left;
@@ -133,6 +135,7 @@ @@ -133,6 +135,7 @@
133 width: 282px; 135 width: 282px;
134 height: 504px; 136 height: 504px;
135 } 137 }
  138 +
136 } 139 }
137 } 140 }
138 141
@@ -266,6 +266,8 @@ class BoysController extends AbstractAction @@ -266,6 +266,8 @@ class BoysController extends AbstractAction
266 'headerdata' => $headerdata, 266 'headerdata' => $headerdata,
267 'boysHomePage' => true, 267 'boysHomePage' => true,
268 'boy' => array( 268 'boy' => array(
  269 + array(
  270 + 'slide' => array(
269 'bigSlide' => array( 271 'bigSlide' => array(
270 array( 272 array(
271 'href' => '/?gender=1,3', 273 'href' => '/?gender=1,3',
@@ -285,7 +287,10 @@ class BoysController extends AbstractAction @@ -285,7 +287,10 @@ class BoysController extends AbstractAction
285 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3', 287 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3',
286 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/27/09/015b6a29ee526edeaacd13f4a7c81475f0.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90' 288 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/27/09/015b6a29ee526edeaacd13f4a7c81475f0.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90'
287 ) 289 )
  290 + )
  291 + )
288 ), 292 ),
  293 + array(
289 'newReport' => array( 294 'newReport' => array(
290 'name' => '最新速报 NEW!', 295 'name' => '最新速报 NEW!',
291 'list' => array( 296 'list' => array(
@@ -322,7 +327,9 @@ class BoysController extends AbstractAction @@ -322,7 +327,9 @@ class BoysController extends AbstractAction
322 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504' 327 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504'
323 ) 328 )
324 ) 329 )
  330 + )
325 ), 331 ),
  332 + array(
326 'preferenceBrand' => array( 333 'preferenceBrand' => array(
327 'name' => '优选品牌 BRAND', 334 'name' => '优选品牌 BRAND',
328 'imgBrand' => array( 335 'imgBrand' => array(
@@ -363,8 +370,12 @@ class BoysController extends AbstractAction @@ -363,8 +370,12 @@ class BoysController extends AbstractAction
363 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90' 370 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
364 ) 371 )
365 ) 372 )
  373 + )
  374 + ),
  375 + array(
  376 + 'recommend'=>array($tpldata,$tpldata,$tpldata)
366 ), 377 ),
367 - 'recommend'=>array($tpldata,$tpldata,$tpldata), 378 + array(
368 'newArrivls' => array( 379 'newArrivls' => array(
369 'name' => '最新上架 NEW ARRIVALS', 380 'name' => '最新上架 NEW ARRIVALS',
370 'navs' => array( 381 'navs' => array(
@@ -376,6 +387,7 @@ class BoysController extends AbstractAction @@ -376,6 +387,7 @@ class BoysController extends AbstractAction
376 ) 387 )
377 ) 388 )
378 ) 389 )
  390 + )
379 ); 391 );
380 $this->_view->display('index', $data); 392 $this->_view->display('index', $data);
381 } 393 }