Showing
9 changed files
with
192 additions
and
121 deletions
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | -<div class="home-page yoho-page" data-page="kids"> | 2 | +<div class="home-page yoho-page kids" data-page="kids" data-newarrivls='{"url":"/kids/commodity","pageCount":"4","flag":"kids"}'> |
3 | {{# kids}} | 3 | {{# kids}} |
4 | {{! 头部banner}} | 4 | {{! 头部banner}} |
5 | {{# slide}} | 5 | {{# slide}} |
@@ -10,6 +10,27 @@ | @@ -10,6 +10,27 @@ | ||
10 | {{# preferenceBrands}} | 10 | {{# preferenceBrands}} |
11 | {{> index/preference-brand}} | 11 | {{> index/preference-brand}} |
12 | {{/ preferenceBrands}} | 12 | {{/ preferenceBrands}} |
13 | + | ||
14 | + {{! 热门分类}} | ||
15 | + {{# recommend}} | ||
16 | + {{> index/girl-recommend}} | ||
17 | + {{/ recommend}} | ||
18 | + | ||
19 | + {{! 单品/广告}} | ||
20 | + {{# singlehot}} | ||
21 | + {{> index/girl-singlehot}} | ||
22 | + {{/ singlehot}} | ||
23 | + | ||
24 | + {{! GIRL KIDS}} | ||
25 | + {{# girlkids}} | ||
26 | + {{> index/girl-singlehot}} | ||
27 | + {{/ girlkids}} | ||
28 | + | ||
29 | + | ||
30 | + {{! 新品上架}} | ||
31 | + {{# newArrivls}} | ||
32 | + {{> index/commodity}} | ||
33 | + {{/ newArrivls}} | ||
13 | {{/ kids}} | 34 | {{/ kids}} |
14 | </div> | 35 | </div> |
15 | {{> layout/footer}} | 36 | {{> layout/footer}} |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | -<div class="home-page yoho-page"> | 2 | +<div class="home-page yoho-page lifestyle" data-newarrivls='{"url":"/lifestyle/commodity","pageCount":"4","flag":"lifestyle"}'> |
3 | {{# lifestyle}} | 3 | {{# lifestyle}} |
4 | {{! 头部banner}} | 4 | {{! 头部banner}} |
5 | {{# slide}} | 5 | {{# slide}} |
@@ -15,6 +15,16 @@ | @@ -15,6 +15,16 @@ | ||
15 | {{# category}} | 15 | {{# category}} |
16 | {{> index/category-floor}} | 16 | {{> index/category-floor}} |
17 | {{/ category}} | 17 | {{/ category}} |
18 | + | ||
19 | + {{! 单品/广告}} | ||
20 | + {{# singlehot}} | ||
21 | + {{> index/girl-singlehot}} | ||
22 | + {{/ singlehot}} | ||
23 | + | ||
24 | + {{! 新品上架}} | ||
25 | + {{# newArrivls}} | ||
26 | + {{> index/commodity}} | ||
27 | + {{/ newArrivls}} | ||
18 | {{/ lifestyle}} | 28 | {{/ lifestyle}} |
19 | </div> | 29 | </div> |
20 | {{> layout/footer}} | 30 | {{> layout/footer}} |
@@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
6 | <li> | 6 | <li> |
7 | <a href="{{url}}"><div class="commodity-img"> | 7 | <a href="{{url}}"><div class="commodity-img"> |
8 | {{# tip}} | 8 | {{# tip}} |
9 | - <i class="top">{{tip}}</i> | 9 | + <i class="top">{{.}}</i> |
10 | {{/ tip}} | 10 | {{/ tip}} |
11 | <img class="lazy" data-original="{{img}}"/></div> | 11 | <img class="lazy" data-original="{{img}}"/></div> |
12 | <p class="commodity-name">{{name}}</p> | 12 | <p class="commodity-name">{{name}}</p> |
@@ -81,19 +81,4 @@ | @@ -81,19 +81,4 @@ | ||
81 | height: 502px !important; | 81 | height: 502px !important; |
82 | width: 100% !important; | 82 | width: 100% !important; |
83 | } | 83 | } |
84 | - .commodity-brands{ | ||
85 | - a{ | ||
86 | - float: left; | ||
87 | - margin-left: 8px; | ||
88 | - width: 185px; | ||
89 | - height: 86px; | ||
90 | - display: block; | ||
91 | - img{ | ||
92 | - display: block; | ||
93 | - width: 185px; | ||
94 | - height: 86px; | ||
95 | - } | ||
96 | - } | ||
97 | - } | ||
98 | - | ||
99 | } | 84 | } |
@@ -583,9 +583,9 @@ | @@ -583,9 +583,9 @@ | ||
583 | .commodity{ | 583 | .commodity{ |
584 | position: relative; | 584 | position: relative; |
585 | width: 1160px; | 585 | width: 1160px; |
586 | + margin-bottom:80px; | ||
586 | .commodity-list{ | 587 | .commodity-list{ |
587 | margin-left: -10px; | 588 | margin-left: -10px; |
588 | - margin-bottom:80px; | ||
589 | li{ | 589 | li{ |
590 | float: left; | 590 | float: left; |
591 | margin-left: 10px; | 591 | margin-left: 10px; |
@@ -622,6 +622,20 @@ | @@ -622,6 +622,20 @@ | ||
622 | } | 622 | } |
623 | } | 623 | } |
624 | } | 624 | } |
625 | + .commodity-brands{ | ||
626 | + a{ | ||
627 | + float: left; | ||
628 | + margin-left: 8px; | ||
629 | + width: 185px; | ||
630 | + height: 86px; | ||
631 | + display: block; | ||
632 | + img{ | ||
633 | + display: block; | ||
634 | + width: 185px; | ||
635 | + height: 86px; | ||
636 | + } | ||
637 | + } | ||
638 | + } | ||
625 | .loading{ | 639 | .loading{ |
626 | position: absolute; | 640 | position: absolute; |
627 | bottom: 0; | 641 | bottom: 0; |
@@ -430,38 +430,16 @@ class GirlsController extends AbstractAction | @@ -430,38 +430,16 @@ class GirlsController extends AbstractAction | ||
430 | break; | 430 | break; |
431 | } | 431 | } |
432 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; | 432 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; |
433 | - $result=array( | ||
434 | - 'code'=>200, | ||
435 | - 'commodity'=>array( | ||
436 | - array( | ||
437 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
438 | - 'img'=> $imgsrc, | ||
439 | - 'name'=> '优显led触控台灯', | ||
440 | - 'price'=> 168, | ||
441 | - 'tip'=> '即将售罄' //提示 | ||
442 | - ), | ||
443 | - array( | ||
444 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
445 | - 'img'=> $imgsrc, | ||
446 | - 'name'=> '优显led触控台灯', | ||
447 | - 'price'=> 168, | ||
448 | - 'tip'=> '即将售罄' //提示 | ||
449 | - ), | ||
450 | - array( | 433 | + $data=array( |
451 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | 434 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , |
452 | 'img'=> $imgsrc, | 435 | 'img'=> $imgsrc, |
453 | 'name'=> '优显led触控台灯', | 436 | 'name'=> '优显led触控台灯', |
454 | 'price'=> 168, | 437 | 'price'=> 168, |
455 | - 'tip'=> '即将售罄' //提示 | ||
456 | - ), | ||
457 | - array( | ||
458 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
459 | - 'img'=> $imgsrc, | ||
460 | - 'name'=> '优显led触控台灯', | ||
461 | - 'price'=> 168, | ||
462 | - 'tip'=> '即将售罄' //提示 | ||
463 | - ) | ||
464 | - ) | 438 | + 'tip'=> "" //提示 |
439 | + ); | ||
440 | + $result=array( | ||
441 | + 'code'=>200, | ||
442 | + 'commodity'=>array($data,$data,$data,$data,$data) | ||
465 | ); | 443 | ); |
466 | } while (false); | 444 | } while (false); |
467 | 445 |
@@ -212,6 +212,44 @@ class KidsController extends AbstractAction | @@ -212,6 +212,44 @@ class KidsController extends AbstractAction | ||
212 | ) | 212 | ) |
213 | ) | 213 | ) |
214 | ); | 214 | ); |
215 | + //数据变量 | ||
216 | + $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; | ||
217 | + $name_href=array('name'=>'衣服','url'=>''); | ||
218 | + $name_href_img=array( | ||
219 | + 'href' => '', | ||
220 | + 'img' => $imgsrc, | ||
221 | + 'name'=>'优显led触控台灯' | ||
222 | + ); | ||
223 | + $name_href_img_price=array( | ||
224 | + 'href' => '', | ||
225 | + 'img' => $imgsrc, | ||
226 | + 'name'=>'优显led触控台灯', | ||
227 | + 'price'=>'100' | ||
228 | + ); | ||
229 | + $name_href_name_price_tip=array( | ||
230 | + 'href' => '', | ||
231 | + 'img' => $imgsrc, | ||
232 | + 'name'=>'优显led触控台灯', | ||
233 | + 'price'=>'100', | ||
234 | + 'tip'=>'TOP1' | ||
235 | + ); | ||
236 | + | ||
237 | + $tpldata = array( | ||
238 | + 'name'=>'热门分类', | ||
239 | + 'navs' => array( | ||
240 | + array( | ||
241 | + 'id' => '', | ||
242 | + 'href' => '', | ||
243 | + 'name' => 'MORE' | ||
244 | + ) | ||
245 | + ), | ||
246 | + 'tplrecommend'=>array( | ||
247 | + 'keyword'=>array($name_href_img,$name_href_img,$name_href_img), | ||
248 | + '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), | ||
249 | + 'brands'=>array($name_href_img), | ||
250 | + 'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img) | ||
251 | + ) | ||
252 | + ); | ||
215 | $data = array( | 253 | $data = array( |
216 | 'headerdata' => $headerdata, | 254 | 'headerdata' => $headerdata, |
217 | 'boysHomePage' => true, | 255 | 'boysHomePage' => true, |
@@ -334,6 +372,34 @@ class KidsController extends AbstractAction | @@ -334,6 +372,34 @@ class KidsController extends AbstractAction | ||
334 | ) | 372 | ) |
335 | ) | 373 | ) |
336 | ) | 374 | ) |
375 | + ), | ||
376 | + array( | ||
377 | + 'recommend'=>$tpldata//热门分类 | ||
378 | + ), | ||
379 | + array( | ||
380 | + 'singlehot'=>array( | ||
381 | + 'name' => 'BOY KIDS', | ||
382 | + 'imgHot' => array( $name_href_name_price_tip,$name_href_name_price_tip,$name_href_name_price_tip,$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), | ||
383 | + 'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img) | ||
384 | + ) | ||
385 | + ), | ||
386 | + array( | ||
387 | + 'girlkids'=>array( | ||
388 | + 'name' => 'GIRL KIDS', | ||
389 | + 'imgHot' => array( $name_href_name_price_tip,$name_href_name_price_tip,$name_href_name_price_tip,$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) | ||
390 | + ) | ||
391 | + ), | ||
392 | + array( | ||
393 | + 'newArrivls' => array( | ||
394 | + 'name' => '最新上架 NEW ARRIVALS', | ||
395 | + 'navs' => array( | ||
396 | + array( | ||
397 | + 'id' => '', | ||
398 | + 'href' => '', | ||
399 | + 'name' => 'MORE' | ||
400 | + ) | ||
401 | + ) | ||
402 | + ) | ||
337 | ) | 403 | ) |
338 | ) | 404 | ) |
339 | ); | 405 | ); |
@@ -364,45 +430,16 @@ class KidsController extends AbstractAction | @@ -364,45 +430,16 @@ class KidsController extends AbstractAction | ||
364 | break; | 430 | break; |
365 | } | 431 | } |
366 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; | 432 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; |
367 | - $result=array( | ||
368 | - 'code'=>200, | ||
369 | - 'commodity'=>array( | ||
370 | - array( | 433 | + $data=array( |
371 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | 434 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , |
372 | 'img'=> $imgsrc, | 435 | 'img'=> $imgsrc, |
373 | 'name'=> '优显led触控台灯', | 436 | 'name'=> '优显led触控台灯', |
374 | 'price'=> 168, | 437 | 'price'=> 168, |
375 | - 'state'=> 1 //状态 | ||
376 | - ), | ||
377 | - array( | ||
378 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
379 | - 'img'=> $imgsrc, | ||
380 | - 'name'=> '优显led触控台灯', | ||
381 | - 'price'=> 168, | ||
382 | - 'state'=> 1 //状态 | ||
383 | - ), | ||
384 | - array( | ||
385 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
386 | - 'img'=> $imgsrc, | ||
387 | - 'name'=> '优显led触控台灯', | ||
388 | - 'price'=> 168, | ||
389 | - 'state'=> 1 //状态 | ||
390 | - ), | ||
391 | - array( | ||
392 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
393 | - 'img'=> $imgsrc, | ||
394 | - 'name'=> '优显led触控台灯', | ||
395 | - 'price'=> 168, | ||
396 | - 'state'=> 1 //状态 | ||
397 | - ), | ||
398 | - array( | ||
399 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
400 | - 'img'=> $imgsrc, | ||
401 | - 'name'=> '优显led触控台灯', | ||
402 | - 'price'=> 168, | ||
403 | - 'state'=> 1 //状态 | ||
404 | - ) | ||
405 | - ) | 438 | + 'tip'=> "即将售罄" //提示 |
439 | + ); | ||
440 | + $result=array( | ||
441 | + 'code'=>200, | ||
442 | + 'commodity'=>array($data,$data,$data,$data) | ||
406 | ); | 443 | ); |
407 | } while (false); | 444 | } while (false); |
408 | 445 |
@@ -212,6 +212,46 @@ class LifestyleController extends AbstractAction | @@ -212,6 +212,46 @@ class LifestyleController 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 | + $name_href_name_price_tip=array( | ||
232 | + 'href' => '', | ||
233 | + 'img' => $imgsrc, | ||
234 | + 'name'=>'优显led触控台灯', | ||
235 | + 'price'=>'100', | ||
236 | + 'tip'=>'TOP1' | ||
237 | + ); | ||
238 | + | ||
239 | + $tpldata = array( | ||
240 | + 'name'=>'热门分类', | ||
241 | + 'navs' => array( | ||
242 | + array( | ||
243 | + 'id' => '', | ||
244 | + 'href' => '', | ||
245 | + 'name' => 'MORE' | ||
246 | + ) | ||
247 | + ), | ||
248 | + 'tplrecommend'=>array( | ||
249 | + 'keyword'=>array($name_href_img,$name_href_img,$name_href_img), | ||
250 | + '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), | ||
251 | + 'brands'=>array($name_href_img), | ||
252 | + 'types'=>array($name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img) | ||
253 | + ) | ||
254 | + ); | ||
215 | $data = array( | 255 | $data = array( |
216 | 'headerdata' => $headerdata, | 256 | 'headerdata' => $headerdata, |
217 | 'boysHomePage' => true, | 257 | 'boysHomePage' => true, |
@@ -466,6 +506,25 @@ class LifestyleController extends AbstractAction | @@ -466,6 +506,25 @@ class LifestyleController extends AbstractAction | ||
466 | ) | 506 | ) |
467 | ) | 507 | ) |
468 | ) | 508 | ) |
509 | + ), | ||
510 | + array( | ||
511 | + 'singlehot'=>array( | ||
512 | + 'name' => '人气单品 TOP100', | ||
513 | + 'imgHot' => array( $name_href_name_price_tip,$name_href_name_price_tip,$name_href_name_price_tip,$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), | ||
514 | + 'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img) | ||
515 | + ) | ||
516 | + ), | ||
517 | + array( | ||
518 | + 'newArrivls' => array( | ||
519 | + 'name' => '最新上架 NEW ARRIVALS', | ||
520 | + 'navs' => array( | ||
521 | + array( | ||
522 | + 'id' => '', | ||
523 | + 'href' => '', | ||
524 | + 'name' => 'MORE' | ||
525 | + ) | ||
526 | + ) | ||
527 | + ) | ||
469 | ) | 528 | ) |
470 | ) | 529 | ) |
471 | ); | 530 | ); |
@@ -497,45 +556,16 @@ class LifestyleController extends AbstractAction | @@ -497,45 +556,16 @@ class LifestyleController extends AbstractAction | ||
497 | break; | 556 | break; |
498 | } | 557 | } |
499 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; | 558 | $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; |
500 | - $result=array( | ||
501 | - 'code'=>200, | ||
502 | - 'commodity'=>array( | ||
503 | - array( | 559 | + $data=array( |
504 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | 560 | 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , |
505 | 'img'=> $imgsrc, | 561 | 'img'=> $imgsrc, |
506 | 'name'=> '优显led触控台灯', | 562 | 'name'=> '优显led触控台灯', |
507 | 'price'=> 168, | 563 | 'price'=> 168, |
508 | - 'state'=> 1 //状态 | ||
509 | - ), | ||
510 | - array( | ||
511 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
512 | - 'img'=> $imgsrc, | ||
513 | - 'name'=> '优显led触控台灯', | ||
514 | - 'price'=> 168, | ||
515 | - 'state'=> 1 //状态 | ||
516 | - ), | ||
517 | - array( | ||
518 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
519 | - 'img'=> $imgsrc, | ||
520 | - 'name'=> '优显led触控台灯', | ||
521 | - 'price'=> 168, | ||
522 | - 'state'=> 1 //状态 | ||
523 | - ), | ||
524 | - array( | ||
525 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
526 | - 'img'=> $imgsrc, | ||
527 | - 'name'=> '优显led触控台灯', | ||
528 | - 'price'=> 168, | ||
529 | - 'state'=> 1 //状态 | ||
530 | - ), | ||
531 | - array( | ||
532 | - 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , | ||
533 | - 'img'=> $imgsrc, | ||
534 | - 'name'=> '优显led触控台灯', | ||
535 | - 'price'=> 168, | ||
536 | - 'state'=> 1 //状态 | ||
537 | - ) | ||
538 | - ) | 564 | + 'tip'=> "即将售罄" //提示 |
565 | + ); | ||
566 | + $result=array( | ||
567 | + 'code'=>200, | ||
568 | + 'commodity'=>array($data,$data,$data,$data) | ||
539 | ); | 569 | ); |
540 | } while (false); | 570 | } while (false); |
541 | 571 |
-
Please register or login to post a comment