Authored by weiqingting

女装首页和男装修改

1 {{> layout/header}} 1 {{> layout/header}}
2 -<div class="home-page yoho-page"> 2 +<div class="home-page yoho-page boys" data-newarrivls='{"url":"/boys/commodity","pageCount":"4","flag":"boys"}'>
3 {{# boy}} 3 {{# boy}}
4 4
5 {{! 头部banner}} 5 {{! 头部banner}}
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 98
99 {{! 单品/广告}} 99 {{! 单品/广告}}
100 {{# singlehot}} 100 {{# singlehot}}
101 - {{> index/singlehot}} 101 + {{> index/boy-singlehot}}
102 {{/ singlehot}} 102 {{/ singlehot}}
103 103
104 {{! 广告}} 104 {{! 广告}}
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 110
111 {{! 品类推荐}} 111 {{! 品类推荐}}
112 {{# recommend}} 112 {{# recommend}}
113 - {{> index/recommend}} 113 + {{> index/boy-recommend}}
114 {{/ recommend}} 114 {{/ recommend}}
115 115
116 {{! 新品上架}} 116 {{! 新品上架}}
1 {{> layout/header}} 1 {{> layout/header}}
2 -<div class="home-page yoho-page">  
3 - girls 2 +<div class="home-page yoho-page girls" data-newarrivls='{"url":"/girls/commodity","pageCount":"4","flag":"girls"}'>
  3 + {{#girl}}
  4 +
  5 +
  6 + {{! 品类推荐}}
  7 + {{# recommend}}
  8 + {{> index/girl-recommend}}
  9 + {{/ recommend}}
  10 +
  11 + {{! 单品/广告}}
  12 + {{# singlehot}}
  13 + {{> index/girl-singlehot}}
  14 + {{/ singlehot}}
  15 +
  16 + {{! 广告}}
  17 + {{# adbanner}}
  18 +
  19 + {{/ adbanner}}
  20 +
  21 + {{! 新品上架}}
  22 + {{# newArrivls}}
  23 + {{> index/commodity}}
  24 + {{/ newArrivls}}
  25 + {{/girl}}
4 </div> 26 </div>
5 {{> layout/footer}} 27 {{> layout/footer}}
1 {{> layout/header}} 1 {{> layout/header}}
2 -<div class="home-page yoho-page">  
3 - kids 2 +<div class="home-page yoho-page kids" data-newarrivls='{"url":"/kids/commodity","pageCount":"4","flag":"kids"}'>
  3 + {{#kid}}
  4 + {{! 新品上架}}
  5 + {{# newArrivls}}
  6 + {{> index/commodity}}
  7 + {{/ newArrivls}}
  8 + {{/kid}}
4 </div> 9 </div>
5 {{> layout/footer}} 10 {{> layout/footer}}
1 {{> layout/header}} 1 {{> layout/header}}
2 -<div class="home-page yoho-page">  
3 - lifestyle 2 +<div class="home-page yoho-page lifestyle" data-newarrivls='{"url":"/lifestyle/commodity","pageCount":"4","flag":"lifestyle"}'>
  3 + {{#lifestyle}}
  4 + {{! 新品上架}}
  5 + {{# newArrivls}}
  6 + {{> index/commodity}}
  7 + {{/ newArrivls}}
  8 + {{/lifestyle}}
4 </div> 9 </div>
5 {{> layout/footer}} 10 {{> layout/footer}}
@@ -5,26 +5,26 @@ @@ -5,26 +5,26 @@
5 <div class="tpl-nav"> 5 <div class="tpl-nav">
6 <div class="tpl-keywords"> 6 <div class="tpl-keywords">
7 {{#each keyword}} 7 {{#each keyword}}
8 - <a class="keywords{{@index}}" title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a> 8 + <a class="keywords{{@index}}" title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
9 {{/ keyword}} 9 {{/ keyword}}
10 </div> 10 </div>
11 <div class="tpl-category clearfix"> 11 <div class="tpl-category clearfix">
12 {{#each category}} 12 {{#each category}}
13 - <a href="{{url}}">{{name}}</a> 13 + <a href="{{href}}">{{name}}</a>
14 {{/ category}} 14 {{/ category}}
15 </div> 15 </div>
16 </div> 16 </div>
17 <div class="tpl-brands clearfix"> 17 <div class="tpl-brands clearfix">
18 <ul> 18 <ul>
19 {{#each brands}} 19 {{#each brands}}
20 - <li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li> 20 + <li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
21 {{/each}} 21 {{/each}}
22 </ul> 22 </ul>
23 </div> 23 </div>
24 <div class="tpl-types clearfix"> 24 <div class="tpl-types clearfix">
25 <ul> 25 <ul>
26 {{#each types}} 26 {{#each types}}
27 - <li><a title="{{name}}" href="{{url}}"><img class="lazy" data-original="{{img}}"/></a></li> 27 + <li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
28 {{/each}} 28 {{/each}}
29 </ul> 29 </ul>
30 </div> 30 </div>
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <div class="tpl-products clearfix"> 32 <div class="tpl-products clearfix">
33 <ul> 33 <ul>
34 {{#each products}} 34 {{#each products}}
35 - <li><a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a></li> 35 + <li><a href="{{href}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a></li>
36 {{/each}} 36 {{/each}}
37 </ul> 37 </ul>
38 </div> 38 </div>
1 {{> index/floor-header}} 1 {{> index/floor-header}}
2 -<div class="commodity clearfix">  
3 - 2 +<div class="commodity clearfix" id="newarrivals">
4 <ul class="clearfix"> 3 <ul class="clearfix">
5 -  
6 </ul> 4 </ul>
7 <div class="loading"> 5 <div class="loading">
8 {{# navs}} 6 {{# navs}}
  1 +{{# tplrecommend}}
  2 +{{> index/floor-header}}
  3 +<div class="tpl-recommend clearfix">
  4 + <div class="tpl-body clearfix">
  5 + <div class="tpl-nav">
  6 + <div class="tpl-keywords">
  7 + {{#each keyword}}
  8 + <a class="keywords{{@index}}" title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
  9 + {{/ keyword}}
  10 + </div>
  11 + <div class="tpl-category clearfix">
  12 + {{#each category}}
  13 + <a href="{{href}}">{{name}}</a>
  14 + {{/ category}}
  15 + </div>
  16 + </div>
  17 + <div class="tpl-brands clearfix">
  18 + {{#each brands}}
  19 + <a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a>
  20 + {{/each}}
  21 + </div>
  22 + <div class="tpl-types clearfix">
  23 + <ul>
  24 + {{#each types}}
  25 + <li><a title="{{name}}" href="{{href}}"><img class="lazy" data-original="{{img}}"/></a></li>
  26 + {{/each}}
  27 + </ul>
  28 + </div>
  29 + </div>
  30 +</div>
  31 +{{/ tplrecommend}}
  1 +{{> index/floor-header}}
  2 +<div class="commodity clearfix">
  3 +
  4 + <ul class="clearfix">
  5 + {{#each imgHot}}
  6 + <li>
  7 + <a href="{{url}}"><div class="commodity-img">
  8 + {{# state}}
  9 + <i class="commodity-tag{{.}}"></i>
  10 + {{/ state}}
  11 + <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>
  12 + <p class="commodity-name">{{name}}</p>
  13 + <p class="commodity-price"><span>¥{{price}}</span></p>
  14 + </a>
  15 + </li>
  16 + {{/each}}
  17 + </ul>
  18 +</div>
@@ -4,8 +4,8 @@ var $ = require('yoho.jquery'); @@ -4,8 +4,8 @@ var $ = require('yoho.jquery');
4 var Handlebars = require('yoho.handlebars'); 4 var Handlebars = require('yoho.handlebars');
5 var InfiniteLoad = require('../common/infinite-load'); 5 var InfiniteLoad = require('../common/infinite-load');
6 6
7 -(function($) {  
8 - var $container = $('div.commodity ul'); 7 +module.exports=function(url,data){
  8 + var $container = $('#newarrivals ul');
9 var $load = $('.loading a'); 9 var $load = $('.loading a');
10 var load = new InfiniteLoad({ 10 var load = new InfiniteLoad({
11 offset: { 11 offset: {
@@ -16,14 +16,12 @@ var InfiniteLoad = require('../common/infinite-load'); @@ -16,14 +16,12 @@ var InfiniteLoad = require('../common/infinite-load');
16 }); 16 });
17 17
18 load.on('after', function(p) { 18 load.on('after', function(p) {
  19 +
  20 + data=$.extend({},data,{pageIndex: p.index});
19 var options = { 21 var options = {
20 type: 'POST', 22 type: 'POST',
21 - url: '/boys/commodity',  
22 - data: {  
23 - pageIndex: p.index,  
24 - pageCount: 10,  
25 - flag: 'boy'  
26 - }, 23 + url: url,
  24 + data: data,
27 success: function(data) { 25 success: function(data) {
28 var code = data.code; 26 var code = data.code;
29 var myTemplate; 27 var myTemplate;
@@ -46,6 +44,7 @@ var InfiniteLoad = require('../common/infinite-load'); @@ -46,6 +44,7 @@ var InfiniteLoad = require('../common/infinite-load');
46 }, 44 },
47 error: function() { 45 error: function() {
48 46
  47 + load.stop();
49 $load.html('网络断开连接了~'); 48 $load.html('网络断开连接了~');
50 } 49 }
51 }; 50 };
@@ -58,14 +57,14 @@ var InfiniteLoad = require('../common/infinite-load'); @@ -58,14 +57,14 @@ var InfiniteLoad = require('../common/infinite-load');
58 //请求模板 57 //请求模板
59 load.tpl = '{{#each this}}'; 58 load.tpl = '{{#each this}}';
60 load.tpl += '<li>'; 59 load.tpl += '<li>';
61 - load.tpl += ' {{# state}}';  
62 - load.tpl += ' <i class="commodity-tag{{.}}"></i>';  
63 - load.tpl += ' {{/ state}}';  
64 - load.tpl += ' <a href="{{url}}"><div class="commodity-img">'; 60 + load.tpl += ' <a href="{{url}}"><div class="commodity-img">';
  61 + load.tpl += ' {{# tip}}';
  62 + load.tpl += ' <i class="commodity-tag">{{.}}</i>';
  63 + load.tpl += ' {{/ tip}}';
65 load.tpl += ' <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>'; 64 load.tpl += ' <img class="lazy" data-original="{{img}}" src="{{img}}"/></div>';
66 - load.tpl += ' <p class="commodity-name">{{name}}</p>';  
67 - load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';  
68 - load.tpl += ' </a>'; 65 + load.tpl += ' <p class="commodity-name">{{name}}</p>';
  66 + load.tpl += ' <p class="commodity-price"><span>¥{{price}}</span></p>';
  67 + load.tpl += ' </a>';
69 load.tpl += '</li>'; 68 load.tpl += '</li>';
70 load.tpl += '{{/each}}'; 69 load.tpl += '{{/each}}';
71 70
@@ -73,6 +72,7 @@ var InfiniteLoad = require('../common/infinite-load'); @@ -73,6 +72,7 @@ var InfiniteLoad = require('../common/infinite-load');
73 }); 72 });
74 73
75 load.init(); 74 load.init();
76 -}($)); 75 +}
  76 +
77 77
78 78
@@ -9,8 +9,14 @@ var $ = require('yoho.jquery'), @@ -9,8 +9,14 @@ var $ = require('yoho.jquery'),
9 lazyLoad = require('yoho.lazyload'); 9 lazyLoad = require('yoho.lazyload');
10 10
11 require('../common/linkage-slider'); 11 require('../common/linkage-slider');
  12 +
12 require('../common/slider2'); 13 require('../common/slider2');
13 -require('../common/new-arrivls'); 14 +
  15 +var $data= JSON.parse($(".home-page").attr('data-newarrivls'));
  16 +require('../common/new-arrivls')($data.url,{
  17 + pageCount: $data.pageCount,
  18 + flag: $data.flag
  19 + });
14 20
15 lazyLoad($('img.lazy')); 21 lazyLoad($('img.lazy'));
16 $('.slide-container').linkageSlider(); 22 $('.slide-container').linkageSlider();
  1 +.girls,.kids,.lifestyle{
  2 + .commodity{
  3 + li{
  4 + width: 280px;
  5 + a{
  6 + display: block;
  7 + width: 280px;
  8 + height: 465px;
  9 + position: relative;
  10 + }
  11 + i{
  12 + position: absolute;
  13 + bottom: 0;
  14 + width: 100%;
  15 + height: 20px;
  16 + background: #ffac5b;
  17 + color: #fff;
  18 + line-height: 20px;
  19 + text-align: center;
  20 + font-size: 12px;
  21 + }
  22 + .commodity-img{
  23 + img{
  24 + width: 280px;
  25 + height: 374px;
  26 + }
  27 + }
  28 + }
  29 + }
  30 +}
  31 +.boys{
  32 + .commodity{
  33 + i{
  34 + position: absolute;
  35 + top: -20px;
  36 + display: block;
  37 + width: 64px;
  38 + height: 20px;
  39 + }
  40 + }
  41 + .tpl-keywords{
  42 + .keywords0{
  43 + img{
  44 + height: 152px;
  45 + }
  46 + margin-bottom: 10px;
  47 + }
  48 + .keywords1{
  49 + img{
  50 + height: 86px;
  51 + }
  52 + }
  53 + }
  54 +
  55 +}
  56 +.girls{
  57 + .tpl-keywords{
  58 + img{
  59 + height: 76px !important;
  60 + }
  61 + .keywords0{
  62 + margin-bottom: 10px;
  63 + }
  64 + .keywords1{
  65 + margin-bottom: 10px;
  66 + }
  67 + }
  68 + .tpl-brands img{
  69 + height: 502px !important;
  70 + width: 100% !important;
  71 + }
  72 +}
@@ -266,18 +266,7 @@ @@ -266,18 +266,7 @@
266 height: 512px; 266 height: 512px;
267 overflow: hidden; 267 overflow: hidden;
268 .tpl-keywords{ 268 .tpl-keywords{
269 - .keywords0{  
270 - img{  
271 - height: 152px;  
272 - }  
273 - margin-bottom: 10px;  
274 - }  
275 - .keywords1{  
276 - img{  
277 - height: 86px;  
278 - }  
279 - margin-bottom: 8px;  
280 - } 269 + margin-bottom: 8px;
281 } 270 }
282 .tpl-category{ 271 .tpl-category{
283 height: 228px; 272 height: 228px;
@@ -328,18 +317,15 @@ @@ -328,18 +317,15 @@
328 } 317 }
329 .tpl-products{ 318 .tpl-products{
330 319
331 - width: 100%;  
332 height: 298px; 320 height: 298px;
333 overflow: hidden; 321 overflow: hidden;
334 -  
335 - ul{margin-left:-10px;  
336 - li{  
337 - float: left;  
338 - margin-left:10px;  
339 - img{  
340 - width: 222px;  
341 - height: 298px;  
342 - } 322 + margin-left:-10px;
  323 + li{
  324 + float: left;
  325 + margin-left:10px;
  326 + img{
  327 + width: 222px;
  328 + height: 298px;
343 } 329 }
344 } 330 }
345 } 331 }
@@ -352,36 +338,35 @@ @@ -352,36 +338,35 @@
352 li{ 338 li{
353 float: left; 339 float: left;
354 margin-left: 10px; 340 margin-left: 10px;
355 - margin-bottom:28px;  
356 - padding-top:20px;  
357 - position: relative;  
358 - i{  
359 - position: absolute;  
360 - top: 0px;  
361 - display: block;  
362 - width: 64px;  
363 - height: 20px;  
364 - }  
365 a{ 341 a{
366 display: block; 342 display: block;
367 - height: 360px; 343 + height: 408px;
368 width: 222px; 344 width: 222px;
369 - .commodity-img{  
370 - img{  
371 - display: block;  
372 - height: 298px;  
373 - width: 222px;  
374 - }  
375 - }  
376 - p.commodity-name{  
377 - font-size: 12px;  
378 - color: #000;  
379 - line-height: 40px;  
380 - text-align: center; 345 + }
  346 + .commodity-img{
  347 + position: relative;
  348 + img{
  349 + display: block;
  350 + height: 298px;
  351 + width: 222px;
381 } 352 }
382 - p.commodity-price{ 353 + }
  354 + p.commodity-name{
  355 + font-size: 12px;
  356 + color: #000;
  357 + text-align: center;
  358 + margin-top: 14px;
  359 + line-height: 18px;
  360 + }
  361 + p.commodity-price{
  362 + position: relative;
  363 + margin: 3px 0 0 0;
  364 + text-align: center;
  365 + line-height: 20px;
  366 + color: #000;
  367 + span{
  368 + display: inline-block;
383 font-size: 12px; 369 font-size: 12px;
384 - text-align: center;  
385 } 370 }
386 } 371 }
387 } 372 }
@@ -393,7 +378,6 @@ @@ -393,7 +378,6 @@
393 font-size: 20px; 378 font-size: 20px;
394 } 379 }
395 } 380 }
396 -  
397 .singlehot{ 381 .singlehot{
398 width: 100%; 382 width: 100%;
399 height: 584px; 383 height: 584px;
@@ -482,4 +466,5 @@ @@ -482,4 +466,5 @@
482 } 466 }
483 } 467 }
484 } 468 }
485 -}  
  469 +}
  470 +@import "_index-pliffy";
@@ -212,6 +212,22 @@ class BoysController extends AbstractAction @@ -212,6 +212,22 @@ class BoysController extends AbstractAction
212 ) 212 )
213 ) 213 )
214 ); 214 );
  215 +
  216 +
  217 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
  218 + $name_href=array('name'=>'衣服','url'=>'');
  219 + $name_href_img=array(
  220 + 'href' => '',
  221 + 'img' => $imgsrc,
  222 + 'name'=>'优显led触控台灯'
  223 + );
  224 + $name_href_img_price=array(
  225 + 'href' => '',
  226 + 'img' => $imgsrc,
  227 + 'name'=>'优显led触控台灯',
  228 + 'price'=>'100'
  229 + );
  230 +
215 $tpldata = array( 231 $tpldata = array(
216 'name'=>'潮人配饰 ORNAMENT', 232 'name'=>'潮人配饰 ORNAMENT',
217 'navs' => array( 233 'navs' => array(
@@ -222,39 +238,15 @@ class BoysController extends AbstractAction @@ -222,39 +238,15 @@ class BoysController extends AbstractAction
222 ) 238 )
223 ), 239 ),
224 'tplrecommend'=>array( 240 'tplrecommend'=>array(
225 - 'keyword'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),  
226 - 'category'=>array(array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>''),array('name'=>'衣服','url'=>''),array('name'=>'裤子','url'=>'')),  
227 - 'brands'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),  
228 - 'types'=>array(array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>''),array('name'=>'工装短裤','img'=>'','url'=>''),array('name'=>'英伦风','img'=>'','url'=>'')),  
229 - 'products'=>array(  
230 - array(  
231 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
232 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
233 - 'name'=> '优显led触控台灯'  
234 - ),  
235 - array(  
236 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
237 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
238 - 'name'=> '优显led触控台灯'  
239 - ),  
240 - array(  
241 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
242 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
243 - 'name'=> '优显led触控台灯'  
244 - ),  
245 - array(  
246 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
247 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
248 - 'name'=> '优显led触控台灯'  
249 - ),  
250 - array(  
251 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
252 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
253 - 'name'=> '优显led触控台灯'  
254 - )  
255 - ) 241 + 'keyword'=>array($name_href_img,$name_href_img),
  242 + 'category'=>array($name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href),
  243 + 'brands'=>array($name_href_img,$name_href_img),
  244 + 'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img),
  245 + 'products'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
256 ) 246 )
257 ); 247 );
  248 +
  249 +
258 $data = array( 250 $data = array(
259 'headerdata' => $headerdata, 251 'headerdata' => $headerdata,
260 'boysHomePage' => true, 252 'boysHomePage' => true,
@@ -416,51 +408,10 @@ class BoysController extends AbstractAction @@ -416,51 +408,10 @@ class BoysController extends AbstractAction
416 array( 408 array(
417 'singlehot'=>array( 409 'singlehot'=>array(
418 'name' => '单品 HOT', 410 'name' => '单品 HOT',
419 - 'imgHot' => array(  
420 - array(  
421 - 'href' => '',  
422 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
423 - ),  
424 - array(  
425 - 'href' => '',  
426 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
427 - ),  
428 - array(  
429 - 'href' => '',  
430 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
431 - ),  
432 - array(  
433 - 'href' => '',  
434 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
435 - ),  
436 - array(  
437 - 'href' => '',  
438 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
439 - ),  
440 - array(  
441 - 'href' => '',  
442 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
443 - ),  
444 - array(  
445 - 'href' => '',  
446 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
447 - ),  
448 - array(  
449 - 'href' => '',  
450 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
451 - ),  
452 - array(  
453 - 'href' => '',  
454 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
455 - ),  
456 - array(  
457 - 'href' => '',  
458 - 'img' => 'http://img10.static.yhbimg.com/goodsimg/2015/01/30/05/01524c049077911258735906dafd6a4b45.jpg?imageMogr2/thumbnail/378x504/extent/378x504/background/d2hpdGU=/position/center/quality/90'  
459 - )  
460 - ) 411 + 'imgHot' => array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
461 ) 412 )
462 ), 413 ),
463 - array('adbanner'=>array('href' => '','img'=>'' )),//楼层广告 414 + array('adbanner'=>$name_href_img),//楼层广告
464 array( 415 array(
465 'recommend'=>$tpldata//潮人适配 416 'recommend'=>$tpldata//潮人适配
466 ), 417 ),
@@ -504,47 +455,47 @@ class BoysController extends AbstractAction @@ -504,47 +455,47 @@ class BoysController extends AbstractAction
504 if($pageIndex>=3){ 455 if($pageIndex>=3){
505 break; 456 break;
506 } 457 }
507 - 458 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
508 $result=array( 459 $result=array(
509 - 'code'=>200,  
510 - 'commodity'=>array(  
511 - array(  
512 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
513 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
514 - 'name'=> '优显led触控台灯',  
515 - 'price'=> 168,  
516 - 'state'=> 1 //状态  
517 - ),  
518 - array(  
519 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
520 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
521 - 'name'=> '优显led触控台灯',  
522 - 'price'=> 168,  
523 - 'state'=> 1 //状态  
524 - ),  
525 - array(  
526 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
527 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
528 - 'name'=> '优显led触控台灯',  
529 - 'price'=> 168,  
530 - 'state'=> 1 //状态  
531 - ),  
532 - array(  
533 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
534 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
535 - 'name'=> '优显led触控台灯',  
536 - 'price'=> 168,  
537 - 'state'=> 1 //状态  
538 - ),  
539 - array(  
540 - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,  
541 - 'img'=> 'http://img11.static.yhbimg.com/yhb-img01/2015/12/01/02/01c21e6610eefdc5ebd7ad890e49b09c2d.jpg',  
542 - 'name'=> '优显led触控台灯',  
543 - 'price'=> 168,  
544 - 'state'=> 1 //状态  
545 - ) 460 + 'code'=>200,
  461 + 'commodity'=>array(
  462 + array(
  463 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  464 + 'img'=> $imgsrc,
  465 + 'name'=> '优显led触控台灯',
  466 + 'price'=> 168,
  467 + 'state'=> 1 //状态
  468 + ),
  469 + array(
  470 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  471 + 'img'=> $imgsrc,
  472 + 'name'=> '优显led触控台灯',
  473 + 'price'=> 168,
  474 + 'state'=> 1 //状态
  475 + ),
  476 + array(
  477 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  478 + 'img'=> $imgsrc,
  479 + 'name'=> '优显led触控台灯',
  480 + 'price'=> 168,
  481 + 'state'=> 1 //状态
  482 + ),
  483 + array(
  484 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  485 + 'img'=> $imgsrc,
  486 + 'name'=> '优显led触控台灯',
  487 + 'price'=> 168,
  488 + 'state'=> 1 //状态
  489 + ),
  490 + array(
  491 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  492 + 'img'=> $imgsrc,
  493 + 'name'=> '优显led触控台灯',
  494 + 'price'=> 168,
  495 + 'state'=> 1 //状态
  496 + )
546 ) 497 )
547 - ); 498 + );
548 } while (false); 499 } while (false);
549 500
550 $this->echoJson($result); 501 $this->echoJson($result);
@@ -212,13 +212,133 @@ class GirlsController extends AbstractAction @@ -212,13 +212,133 @@ class GirlsController extends AbstractAction
212 ) 212 )
213 ) 213 )
214 ); 214 );
  215 +
  216 +
  217 + //数据变量
  218 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
  219 + $name_href=array('name'=>'衣服','url'=>'');
  220 + $name_href_img=array(
  221 + 'href' => '',
  222 + 'img' => $imgsrc,
  223 + 'name'=>'优显led触控台灯'
  224 + );
  225 + $name_href_img_price=array(
  226 + 'href' => '',
  227 + 'img' => $imgsrc,
  228 + 'name'=>'优显led触控台灯',
  229 + 'price'=>'100'
  230 + );
  231 +
  232 + $tpldata = array(
  233 + 'name'=>'潮人配饰 ORNAMENT',
  234 + 'navs' => array(
  235 + array(
  236 + 'id' => '',
  237 + 'href' => '',
  238 + 'name' => 'MORE'
  239 + )
  240 + ),
  241 + 'tplrecommend'=>array(
  242 + 'keyword'=>array($name_href_img,$name_href_img,$name_href_img),
  243 + 'category'=>array($name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href,$name_href),
  244 + 'brands'=>array($name_href_img),
  245 + 'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
  246 + )
  247 + );
215 $data = array( 248 $data = array(
216 'headerdata' => $headerdata, 249 'headerdata' => $headerdata,
217 'boysHomePage' => true, 250 'boysHomePage' => true,
218 'girl' => array( 251 'girl' => array(
  252 + array(
  253 + 'recommend'=>$tpldata//潮人适配
  254 + ),
  255 + array(
  256 + 'recommend'=>$tpldata
  257 + ),
  258 + array(
  259 + 'singlehot'=>array(
  260 + 'name' => '单品 HOT',
  261 + 'imgHot' => array( $name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price,$name_href_img_price),
  262 + 'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
  263 + )
  264 + ),
  265 + array(
  266 + 'newArrivls' => array(
  267 + 'name' => '最新上架 NEW ARRIVALS',
  268 + 'navs' => array(
  269 + array(
  270 + 'id' => '',
  271 + 'href' => '',
  272 + 'name' => 'MORE'
  273 + )
  274 + )
  275 + )
  276 + )
219 ) 277 )
220 ); 278 );
221 $this->_view->display('index', $data); 279 $this->_view->display('index', $data);
222 } 280 }
223 281
  282 +
  283 +
  284 + /**
  285 + * 男装首页 新品上架 接口数据
  286 + *
  287 + * @param int pageIndex 当前页数
  288 + * @param int pageCount 一页显示个数
  289 + * @param string flag 类型(男装/女装等,用于区分)
  290 + * @return json
  291 + */
  292 + public function commodityAction()
  293 + {
  294 + $result = array();
  295 +
  296 + do {
  297 + /* 判断是不是AJAX请求 */
  298 + if (!$this->isAjax()) {
  299 + break;
  300 + }
  301 + $pageIndex = $this->post('pageIndex');
  302 + if($pageIndex>=3){
  303 + break;
  304 + }
  305 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
  306 + $result=array(
  307 + 'code'=>200,
  308 + 'commodity'=>array(
  309 + array(
  310 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  311 + 'img'=> $imgsrc,
  312 + 'name'=> '优显led触控台灯',
  313 + 'price'=> 168,
  314 + 'tip'=> '即将售罄' //提示
  315 + ),
  316 + array(
  317 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  318 + 'img'=> $imgsrc,
  319 + 'name'=> '优显led触控台灯',
  320 + 'price'=> 168,
  321 + 'tip'=> '即将售罄' //提示
  322 + ),
  323 + array(
  324 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  325 + 'img'=> $imgsrc,
  326 + 'name'=> '优显led触控台灯',
  327 + 'price'=> 168,
  328 + 'tip'=> '即将售罄' //提示
  329 + ),
  330 + array(
  331 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  332 + 'img'=> $imgsrc,
  333 + 'name'=> '优显led触控台灯',
  334 + 'price'=> 168,
  335 + 'tip'=> '即将售罄' //提示
  336 + )
  337 + )
  338 + );
  339 + } while (false);
  340 +
  341 + $this->echoJson($result);
  342 + }
  343 +
224 } 344 }
@@ -215,10 +215,91 @@ class KidsController extends AbstractAction @@ -215,10 +215,91 @@ class KidsController extends AbstractAction
215 $data = array( 215 $data = array(
216 'headerdata' => $headerdata, 216 'headerdata' => $headerdata,
217 'boysHomePage' => true, 217 'boysHomePage' => true,
218 - 'girl' => array( 218 + 'kid' => array(
  219 + array(
  220 + 'newArrivls' => array(
  221 + 'name' => '最新上架 NEW ARRIVALS',
  222 + 'navs' => array(
  223 + array(
  224 + 'id' => '',
  225 + 'href' => '',
  226 + 'name' => 'MORE'
  227 + )
  228 + )
  229 + )
  230 + )
219 ) 231 )
220 ); 232 );
221 $this->_view->display('index', $data); 233 $this->_view->display('index', $data);
222 } 234 }
223 235
  236 +
  237 +
  238 + /**
  239 + * 男装首页 新品上架 接口数据
  240 + *
  241 + * @param int pageIndex 当前页数
  242 + * @param int pageCount 一页显示个数
  243 + * @param string flag 类型(男装/女装等,用于区分)
  244 + * @return json
  245 + */
  246 + public function commodityAction()
  247 + {
  248 + $result = array();
  249 +
  250 + do {
  251 + /* 判断是不是AJAX请求 */
  252 + if (!$this->isAjax()) {
  253 + break;
  254 + }
  255 + $pageIndex = $this->post('pageIndex');
  256 + if($pageIndex>=3){
  257 + break;
  258 + }
  259 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
  260 + $result=array(
  261 + 'code'=>200,
  262 + 'commodity'=>array(
  263 + array(
  264 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  265 + 'img'=> $imgsrc,
  266 + 'name'=> '优显led触控台灯',
  267 + 'price'=> 168,
  268 + 'state'=> 1 //状态
  269 + ),
  270 + array(
  271 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  272 + 'img'=> $imgsrc,
  273 + 'name'=> '优显led触控台灯',
  274 + 'price'=> 168,
  275 + 'state'=> 1 //状态
  276 + ),
  277 + array(
  278 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  279 + 'img'=> $imgsrc,
  280 + 'name'=> '优显led触控台灯',
  281 + 'price'=> 168,
  282 + 'state'=> 1 //状态
  283 + ),
  284 + array(
  285 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  286 + 'img'=> $imgsrc,
  287 + 'name'=> '优显led触控台灯',
  288 + 'price'=> 168,
  289 + 'state'=> 1 //状态
  290 + ),
  291 + array(
  292 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  293 + 'img'=> $imgsrc,
  294 + 'name'=> '优显led触控台灯',
  295 + 'price'=> 168,
  296 + 'state'=> 1 //状态
  297 + )
  298 + )
  299 + );
  300 + } while (false);
  301 +
  302 + $this->echoJson($result);
  303 + }
  304 +
224 } 305 }
@@ -215,10 +215,91 @@ class LifestyleController extends AbstractAction @@ -215,10 +215,91 @@ class LifestyleController extends AbstractAction
215 $data = array( 215 $data = array(
216 'headerdata' => $headerdata, 216 'headerdata' => $headerdata,
217 'boysHomePage' => true, 217 'boysHomePage' => true,
218 - 'girl' => array( 218 + 'lifestyle' => array(
  219 + array(
  220 + 'newArrivls' => array(
  221 + 'name' => '最新上架 NEW ARRIVALS',
  222 + 'navs' => array(
  223 + array(
  224 + 'id' => '',
  225 + 'href' => '',
  226 + 'name' => 'MORE'
  227 + )
  228 + )
  229 + )
  230 + )
219 ) 231 )
220 ); 232 );
221 $this->_view->display('index', $data); 233 $this->_view->display('index', $data);
222 } 234 }
223 235
  236 +
  237 +
  238 +
  239 + /**
  240 + * 男装首页 新品上架 接口数据
  241 + *
  242 + * @param int pageIndex 当前页数
  243 + * @param int pageCount 一页显示个数
  244 + * @param string flag 类型(男装/女装等,用于区分)
  245 + * @return json
  246 + */
  247 + public function commodityAction()
  248 + {
  249 + $result = array();
  250 +
  251 + do {
  252 + /* 判断是不是AJAX请求 */
  253 + if (!$this->isAjax()) {
  254 + break;
  255 + }
  256 + $pageIndex = $this->post('pageIndex');
  257 + if($pageIndex>=3){
  258 + break;
  259 + }
  260 + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
  261 + $result=array(
  262 + 'code'=>200,
  263 + 'commodity'=>array(
  264 + array(
  265 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  266 + 'img'=> $imgsrc,
  267 + 'name'=> '优显led触控台灯',
  268 + 'price'=> 168,
  269 + 'state'=> 1 //状态
  270 + ),
  271 + array(
  272 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  273 + 'img'=> $imgsrc,
  274 + 'name'=> '优显led触控台灯',
  275 + 'price'=> 168,
  276 + 'state'=> 1 //状态
  277 + ),
  278 + array(
  279 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  280 + 'img'=> $imgsrc,
  281 + 'name'=> '优显led触控台灯',
  282 + 'price'=> 168,
  283 + 'state'=> 1 //状态
  284 + ),
  285 + array(
  286 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  287 + 'img'=> $imgsrc,
  288 + 'name'=> '优显led触控台灯',
  289 + 'price'=> 168,
  290 + 'state'=> 1 //状态
  291 + ),
  292 + array(
  293 + 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
  294 + 'img'=> $imgsrc,
  295 + 'name'=> '优显led触控台灯',
  296 + 'price'=> 168,
  297 + 'state'=> 1 //状态
  298 + )
  299 + )
  300 + );
  301 + } while (false);
  302 +
  303 + $this->echoJson($result);
  304 + }
224 } 305 }