Authored by weiqingting

男装首页和女装首页

1 {{> index/floor-header}} 1 {{> index/floor-header}}
2 <div class="commodity clearfix" id="newarrivals"> 2 <div class="commodity clearfix" id="newarrivals">
3 - <ul class="clearfix">  
4 - </ul> 3 + <div class="commodity-list">
  4 + <ul class="clearfix">
  5 + </ul>
  6 + </div>
5 <div class="loading"> 7 <div class="loading">
6 {{# navs}} 8 {{# navs}}
7 <a href="{{href}}">Loading...</a> 9 <a href="{{href}}">Loading...</a>
1 {{> index/floor-header}} 1 {{> index/floor-header}}
2 <div class="commodity clearfix"> 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> 3 + <div class="commodity-list">
  4 + <ul class="clearfix">
  5 + {{#each imgHot}}
  6 + <li>
  7 + <a href="{{url}}"><div class="commodity-img">
  8 + {{# tip}}
  9 + <i class="top">{{tip}}</i>
  10 + {{/ tip}}
  11 + <img class="lazy" data-original="{{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>
  19 + <div class="commodity-brands clearfix">
  20 + {{#each bands}}
  21 + <a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a>
16 {{/each}} 22 {{/each}}
17 - </ul>  
18 -</div>  
  23 + </div>
  24 +</div>
1 .girls,.kids,.lifestyle{ 1 .girls,.kids,.lifestyle{
2 .commodity{ 2 .commodity{
3 - li{  
4 - width: 280px;  
5 - a{  
6 - display: block; 3 + .commodity-list{
  4 + li{
7 width: 280px; 5 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{ 6 + a{
  7 + display: block;
24 width: 280px; 8 width: 280px;
25 - height: 374px; 9 + height: 465px;
  10 + position: relative;
  11 + }
  12 + i{
  13 + position: absolute;
  14 + bottom: 0;
  15 + width: 100%;
  16 + height: 20px;
  17 + background: #ffac5b;
  18 + color: #fff;
  19 + line-height: 20px;
  20 + text-align: center;
  21 + font-size: 12px;
  22 + }
  23 + i.top{
  24 + position: absolute;
  25 + width: 60px;
  26 + height: 60px;
  27 + top: 10px;
  28 + right: 10px;
  29 + line-height: 60px;
  30 + background-color: rgb(255,87,92);
  31 + font-size: 20px;
  32 + color: #fff;
  33 + border-radius: 30px;
  34 + }
  35 + .commodity-img{
  36 + img{
  37 + width: 280px;
  38 + height: 374px;
  39 + }
26 } 40 }
27 } 41 }
28 } 42 }
29 } 43 }
30 } 44 }
31 .boys{ 45 .boys{
32 - .commodity{  
33 - i{  
34 - position: absolute;  
35 - top: -20px;  
36 - display: block;  
37 - width: 64px;  
38 - height: 20px;  
39 - }  
40 - } 46 + .commodity-list i{
  47 + position: absolute;
  48 + top: -20px;
  49 + display: block;
  50 + width: 64px;
  51 + height: 20px;
  52 + }
41 .tpl-keywords{ 53 .tpl-keywords{
42 .keywords0{ 54 .keywords0{
43 img{ 55 img{
@@ -69,4 +81,19 @@ @@ -69,4 +81,19 @@
69 height: 502px !important; 81 height: 502px !important;
70 width: 100% !important; 82 width: 100% !important;
71 } 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 +
72 } 99 }
@@ -582,38 +582,40 @@ @@ -582,38 +582,40 @@
582 margin-left: -10px; 582 margin-left: -10px;
583 margin-bottom:80px; 583 margin-bottom:80px;
584 position: relative; 584 position: relative;
585 - li{  
586 - float: left;  
587 - margin-left: 10px;  
588 - a{  
589 - display: block;  
590 - height: 408px;  
591 - width: 222px;  
592 - }  
593 - .commodity-img{  
594 - position: relative;  
595 - img{ 585 + .commodity-list{
  586 + li{
  587 + float: left;
  588 + margin-left: 10px;
  589 + a{
596 display: block; 590 display: block;
597 - height: 298px; 591 + height: 408px;
598 width: 222px; 592 width: 222px;
599 } 593 }
600 - }  
601 - p.commodity-name{  
602 - font-size: 12px;  
603 - color: #000;  
604 - text-align: center;  
605 - margin-top: 14px;  
606 - line-height: 18px;  
607 - }  
608 - p.commodity-price{  
609 - position: relative;  
610 - margin: 3px 0 0 0;  
611 - text-align: center;  
612 - line-height: 20px;  
613 - color: #000;  
614 - span{  
615 - display: inline-block; 594 + .commodity-img{
  595 + position: relative;
  596 + img{
  597 + display: block;
  598 + height: 298px;
  599 + width: 222px;
  600 + }
  601 + }
  602 + p.commodity-name{
616 font-size: 12px; 603 font-size: 12px;
  604 + color: #000;
  605 + text-align: center;
  606 + margin-top: 14px;
  607 + line-height: 18px;
  608 + }
  609 + p.commodity-price{
  610 + position: relative;
  611 + margin: 3px 0 0 0;
  612 + text-align: center;
  613 + line-height: 20px;
  614 + color: #000;
  615 + span{
  616 + display: inline-block;
  617 + font-size: 12px;
  618 + }
617 } 619 }
618 } 620 }
619 } 621 }
@@ -456,45 +456,16 @@ class BoysController extends AbstractAction @@ -456,45 +456,16 @@ class BoysController extends AbstractAction
456 break; 456 break;
457 } 457 }
458 $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg'; 458 $imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
459 - $result=array(  
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( 459 + $data=array(
491 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' , 460 'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
492 'img'=> $imgsrc, 461 'img'=> $imgsrc,
493 'name'=> '优显led触控台灯', 462 'name'=> '优显led触控台灯',
494 'price'=> 168, 463 'price'=> 168,
495 - 'state'=> 1 //状态  
496 - )  
497 - ) 464 + 'tip'=> "" //提示
  465 + );
  466 + $result=array(
  467 + 'code'=>200,
  468 + 'commodity'=>array($data,$data,$data,$data,$data)
498 ); 469 );
499 } while (false); 470 } while (false);
500 471
@@ -228,6 +228,13 @@ class GirlsController extends AbstractAction @@ -228,6 +228,13 @@ class GirlsController extends AbstractAction
228 'name'=>'优显led触控台灯', 228 'name'=>'优显led触控台灯',
229 'price'=>'100' 229 'price'=>'100'
230 ); 230 );
  231 + $name_href_name_price_tip=array(
  232 + 'href' => '',
  233 + 'img' => $imgsrc,
  234 + 'name'=>'优显led触控台灯',
  235 + 'price'=>'100',
  236 + 'tip'=>'TOP1'
  237 + );
231 238
232 $tpldata = array( 239 $tpldata = array(
233 'name'=>'潮人配饰 ORNAMENT', 240 'name'=>'潮人配饰 ORNAMENT',
@@ -378,7 +385,7 @@ class GirlsController extends AbstractAction @@ -378,7 +385,7 @@ class GirlsController extends AbstractAction
378 array( 385 array(
379 'singlehot'=>array( 386 'singlehot'=>array(
380 'name' => '单品 HOT', 387 'name' => '单品 HOT',
381 - '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), 388 + '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),
382 'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img) 389 'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
383 ) 390 )
384 ), 391 ),