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
@@ -265,113 +265,125 @@ class BoysController extends AbstractAction @@ -265,113 +265,125 @@ class BoysController extends AbstractAction
265 $data = array( 265 $data = array(
266 'headerdata' => $headerdata, 266 'headerdata' => $headerdata,
267 'boysHomePage' => true, 267 'boysHomePage' => true,
268 - 'boy' => array(  
269 - 'bigSlide' => array(  
270 - array(  
271 - 'href' => '/?gender=1,3',  
272 - 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'  
273 - ),  
274 - array(  
275 - 'href' => '/?gender=1,3',  
276 - 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'  
277 - )  
278 - ),  
279 - 'smallSlide' => array(  
280 - array(  
281 - 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3',  
282 - 'img' => 'http://img13.static.yhbimg.com/taobaocms/2015/11/26/12/024a810cfa89d67569c6c3bacedba8869a.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90'  
283 - ),  
284 - array(  
285 - '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' 268 + 'boy' => array(
  269 + array(
  270 + 'slide' => array(
  271 + 'bigSlide' => array(
  272 + array(
  273 + 'href' => '/?gender=1,3',
  274 + 'img' => 'http://img10.static.yhbimg.com/taobaocms/2015/11/26/12/01c3b99f554ad50d9e5a9900719715c94c.jpg'
  275 + ),
  276 + array(
  277 + 'href' => '/?gender=1,3',
  278 + 'img' => 'http://img12.static.yhbimg.com/taobaocms/2015/11/27/09/02a4f1c10e1e81574520e5c0239741a076.jpg'
  279 + )
  280 + ),
  281 + 'smallSlide' => array(
  282 + array(
  283 + 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3',
  284 + 'img' => 'http://img13.static.yhbimg.com/taobaocms/2015/11/26/12/024a810cfa89d67569c6c3bacedba8869a.jpg?imageMogr2/thumbnail/138x54/extent/138x54/background/d2hpdGU=/position/center/quality/90'
  285 + ),
  286 + array(
  287 + 'href' => 'http://sale.yohobuy.com/?specialsale_id=13&gender=1,3',
  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'
  289 + )
  290 + )
287 ) 291 )
288 ), 292 ),
289 - 'newReport' => array( 293 + array(
  294 + 'newReport' => array(
290 'name' => '最新速报 NEW!', 295 'name' => '最新速报 NEW!',
291 - 'list' => array(  
292 - array(  
293 - 'href' => '',  
294 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504'  
295 - ),  
296 - array(  
297 - 'href' => '',  
298 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
299 - ),  
300 - array(  
301 - 'href' => '',  
302 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
303 - ),  
304 - array(  
305 - 'href' => '',  
306 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
307 - ),  
308 - array(  
309 - 'href' => '',  
310 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
311 - ),  
312 - array(  
313 - 'href' => '',  
314 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
315 - ),  
316 - array(  
317 - 'href' => '',  
318 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'  
319 - ),  
320 - array(  
321 - 'href' => '',  
322 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504' 296 + 'list' => array(
  297 + array(
  298 + 'href' => '',
  299 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504'
  300 + ),
  301 + array(
  302 + 'href' => '',
  303 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  304 + ),
  305 + array(
  306 + 'href' => '',
  307 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  308 + ),
  309 + array(
  310 + 'href' => '',
  311 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  312 + ),
  313 + array(
  314 + 'href' => '',
  315 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  316 + ),
  317 + array(
  318 + 'href' => '',
  319 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  320 + ),
  321 + array(
  322 + 'href' => '',
  323 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/03/01b2bd814ed65013e06790a301a0eb6408.jpg?imageView/1/w/185/h/248'
  324 + ),
  325 + array(
  326 + 'href' => '',
  327 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/27/03/0140fd98fd1c15c206d198d458e1c8e96f.jpg?imageView/1/w/377/h/504'
  328 + )
323 ) 329 )
324 ) 330 )
325 ), 331 ),
326 - 'preferenceBrand' => array(  
327 - 'name' => '优选品牌 BRAND',  
328 - 'imgBrand' => array(  
329 - array(  
330 - 'href' => '',  
331 - 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'  
332 - ),  
333 - array(  
334 - 'href' => '',  
335 - 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'  
336 - ),  
337 - array(  
338 - 'href' => '',  
339 - 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'  
340 - ),  
341 - array(  
342 - 'href' => '',  
343 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'  
344 - ),  
345 - array(  
346 - 'href' => '',  
347 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'  
348 - ),  
349 - array(  
350 - 'href' => '',  
351 - 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'  
352 - ),  
353 - array(  
354 - 'href' => '',  
355 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
356 - ),  
357 - array(  
358 - 'href' => '',  
359 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
360 - ),  
361 - array(  
362 - 'href' => '',  
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' 332 + array(
  333 + 'preferenceBrand' => array(
  334 + 'name' => '优选品牌 BRAND',
  335 + 'imgBrand' => array(
  336 + array(
  337 + 'href' => '',
  338 + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'
  339 + ),
  340 + array(
  341 + 'href' => '',
  342 + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'
  343 + ),
  344 + array(
  345 + 'href' => '',
  346 + 'img' => 'http://img11.static.yhbimg.com/taobaocms/2015/11/30/01/01ebe6968476da9e79ddddfd28f60496c7.jpg'
  347 + ),
  348 + array(
  349 + 'href' => '',
  350 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'
  351 + ),
  352 + array(
  353 + 'href' => '',
  354 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'
  355 + ),
  356 + array(
  357 + 'href' => '',
  358 + 'img' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/30/06/0124c4e16548b0d7aff4f0fa4ad7b13481.jpg?imageView/1/w/1150/h/450'
  359 + ),
  360 + array(
  361 + 'href' => '',
  362 + 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
  363 + ),
  364 + array(
  365 + 'href' => '',
  366 + 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'
  367 + ),
  368 + array(
  369 + 'href' => '',
  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'
  371 + )
364 ) 372 )
365 ) 373 )
366 ), 374 ),
367 - 'recommend'=>array($tpldata,$tpldata,$tpldata),  
368 - 'newArrivls' => array(  
369 - 'name' => '最新上架 NEW ARRIVALS',  
370 - 'navs' => array(  
371 - array(  
372 - 'id' => '',  
373 - 'href' => '',  
374 - 'name' => 'MORE' 375 + array(
  376 + 'recommend'=>array($tpldata,$tpldata,$tpldata)
  377 + ),
  378 + array(
  379 + 'newArrivls' => array(
  380 + 'name' => '最新上架 NEW ARRIVALS',
  381 + 'navs' => array(
  382 + array(
  383 + 'id' => '',
  384 + 'href' => '',
  385 + 'name' => 'MORE'
  386 + )
375 ) 387 )
376 ) 388 )
377 ) 389 )