Authored by weiqingting

男装首页和女装首页

{{> index/floor-header}}
<div class="commodity clearfix" id="newarrivals">
<ul class="clearfix">
</ul>
<div class="commodity-list">
<ul class="clearfix">
</ul>
</div>
<div class="loading">
{{# navs}}
<a href="{{href}}">Loading...</a>
... ...
{{> index/floor-header}}
<div class="commodity clearfix">
<ul class="clearfix">
{{#each imgHot}}
<li>
<a href="{{url}}"><div class="commodity-img">
{{# state}}
<i class="commodity-tag{{.}}"></i>
{{/ state}}
<img class="lazy" data-original="{{img}}" src="{{img}}"/></div>
<p class="commodity-name">{{name}}</p>
<p class="commodity-price"><span>¥{{price}}</span></p>
</a>
</li>
<div class="commodity-list">
<ul class="clearfix">
{{#each imgHot}}
<li>
<a href="{{url}}"><div class="commodity-img">
{{# tip}}
<i class="top">{{tip}}</i>
{{/ tip}}
<img class="lazy" data-original="{{img}}"/></div>
<p class="commodity-name">{{name}}</p>
<p class="commodity-price"><span>¥{{price}}</span></p>
</a>
</li>
{{/each}}
</ul>
</div>
<div class="commodity-brands clearfix">
{{#each bands}}
<a href="{{url}}" title="{{name}}"><img class="lazy" data-original="{{img}}"/></a>
{{/each}}
</ul>
</div>
\ No newline at end of file
</div>
</div>
... ...
.girls,.kids,.lifestyle{
.commodity{
li{
width: 280px;
a{
display: block;
.commodity-list{
li{
width: 280px;
height: 465px;
position: relative;
}
i{
position: absolute;
bottom: 0;
width: 100%;
height: 20px;
background: #ffac5b;
color: #fff;
line-height: 20px;
text-align: center;
font-size: 12px;
}
.commodity-img{
img{
a{
display: block;
width: 280px;
height: 374px;
height: 465px;
position: relative;
}
i{
position: absolute;
bottom: 0;
width: 100%;
height: 20px;
background: #ffac5b;
color: #fff;
line-height: 20px;
text-align: center;
font-size: 12px;
}
i.top{
position: absolute;
width: 60px;
height: 60px;
top: 10px;
right: 10px;
line-height: 60px;
background-color: rgb(255,87,92);
font-size: 20px;
color: #fff;
border-radius: 30px;
}
.commodity-img{
img{
width: 280px;
height: 374px;
}
}
}
}
}
}
.boys{
.commodity{
i{
position: absolute;
top: -20px;
display: block;
width: 64px;
height: 20px;
}
}
.commodity-list i{
position: absolute;
top: -20px;
display: block;
width: 64px;
height: 20px;
}
.tpl-keywords{
.keywords0{
img{
... ... @@ -69,4 +81,19 @@
height: 502px !important;
width: 100% !important;
}
.commodity-brands{
a{
float: left;
margin-left: 8px;
width: 185px;
height: 86px;
display: block;
img{
display: block;
width: 185px;
height: 86px;
}
}
}
}
... ...
... ... @@ -582,38 +582,40 @@
margin-left: -10px;
margin-bottom:80px;
position: relative;
li{
float: left;
margin-left: 10px;
a{
display: block;
height: 408px;
width: 222px;
}
.commodity-img{
position: relative;
img{
.commodity-list{
li{
float: left;
margin-left: 10px;
a{
display: block;
height: 298px;
height: 408px;
width: 222px;
}
}
p.commodity-name{
font-size: 12px;
color: #000;
text-align: center;
margin-top: 14px;
line-height: 18px;
}
p.commodity-price{
position: relative;
margin: 3px 0 0 0;
text-align: center;
line-height: 20px;
color: #000;
span{
display: inline-block;
.commodity-img{
position: relative;
img{
display: block;
height: 298px;
width: 222px;
}
}
p.commodity-name{
font-size: 12px;
color: #000;
text-align: center;
margin-top: 14px;
line-height: 18px;
}
p.commodity-price{
position: relative;
margin: 3px 0 0 0;
text-align: center;
line-height: 20px;
color: #000;
span{
display: inline-block;
font-size: 12px;
}
}
}
}
... ...
... ... @@ -456,45 +456,16 @@ class BoysController extends AbstractAction
break;
}
$imgsrc='http://img11.static.yhbimg.com/goodsimg/2015/10/19/10/01b312c3b7a7efebcd671e73495ff3e306.jpg';
$result=array(
'code'=>200,
'commodity'=>array(
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
),
array(
$data=array(
'url' =>'http://www.muji.com.cn/cn/store/goods/4547315967308' ,
'img'=> $imgsrc,
'name'=> '优显led触控台灯',
'price'=> 168,
'state'=> 1 //状态
)
)
'tip'=> "" //提示
);
$result=array(
'code'=>200,
'commodity'=>array($data,$data,$data,$data,$data)
);
} while (false);
... ...
... ... @@ -228,6 +228,13 @@ class GirlsController extends AbstractAction
'name'=>'优显led触控台灯',
'price'=>'100'
);
$name_href_name_price_tip=array(
'href' => '',
'img' => $imgsrc,
'name'=>'优显led触控台灯',
'price'=>'100',
'tip'=>'TOP1'
);
$tpldata = array(
'name'=>'潮人配饰 ORNAMENT',
... ... @@ -378,7 +385,7 @@ class GirlsController extends AbstractAction
array(
'singlehot'=>array(
'name' => '单品 HOT',
'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),
'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),
'bands'=>array( $name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img,$name_href_img)
)
),
... ...