Authored by 梁志锋

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -1186,15 +1186,22 @@
'materials' : {
'title' : '商品材质',
'enTitle' : '',
'img' : '',
'desc' : '用各种洗涤剂',//remark
list:[
{
'img' : '',
'desc' : '用各种洗涤剂',//remark
}
...
]
},
'washTips' : {
'list' : [
{
"caption":"不可干洗",
"img":"http://static.yohobuy.com/images/wash_5.png"
}
...
]
}
... ... @@ -1203,7 +1210,12 @@
'title' : '商品详情',
'enTitle' : '',
'desc' : 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计',
'img' : ''
'list' : [
{
'img':''
}
...
]
},
'cartInfo' : {
... ...
... ... @@ -182,17 +182,19 @@ class Images
$result = json_decode(file_get_contents('http://upload.static.yohobuy.com', false, $context), true);
if(!empty($result['data']['imagesList']))
{
$imgExtra = '?imageMogr2/thumbnail/130x130/extent/130x130/background/d2hpdGU=/position/center/quality/90';
$imgList = array('imgList'=>array());
if(count($file) == 1 || !is_array($file))
{
$imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest'));
$imgList['imgList'][] = array('imgUrl' => self::getSourceUrl(current($result['data']['imagesList']), 'suggest') . $imgExtra);
}
else
{
$img = array();
foreach ($result['data']['imagesList'] as $val) {
$img = array();
$img['imgUrl'] = self::getSourceUrl($val, 'suggest');
$img['imgUrl'] = self::getSourceUrl($val, 'suggest') . $imgExtra;
$imgList['imgList'][] = $img;
}
}
... ...
... ... @@ -35,7 +35,7 @@ $basicBtnC:#eb0313;
.page-block {
box-sizing: border-box;
width: 100%;
border-bottom: 2px solid $borderC;
border-bottom: 1px solid $borderC;
border-top: 1px solid $borderC;
padding: 0 pxToRem(28px);
>.title {
... ...
... ... @@ -18,24 +18,55 @@
}
.materials {
.detail {
img {
display: block;
overflow: hidden;
width: pxToRem(90px);
height: pxToRem(120px);
padding-right: pxToRem(20px);
float: left;
}
.material-desc {
font-size: pxToRem(24px);
overflow: hidden;
.material-item{
margin: pxToRem(10px) 0;
// width: 100%;
border-bottom:1px solid $borderC;
img {
display: block;
overflow: hidden;
width: pxToRem(90px);
height: pxToRem(120px);
padding-right: pxToRem(20px);
float: left;
}
.material-desc {
font-size: pxToRem(24px);
overflow: hidden;
}
}
}
.material-type {
width: pxToRem(581px);
height: pxToRem(99px);
border-top: 1px solid $borderC;
padding: pxToRem(17px) 0;
// .material-type {
// width: pxToRem(581px);
// height: pxToRem(99px);
// border-top: 1px solid $borderC;
// padding: pxToRem(17px) 0;
// }
}
.wash-tips{
padding-top:pxToRem(18px);
&.page-block{
border-top: none;
padding-left: pxToRem(15px);
padding-right: pxToRem(15px);
}
// padding-bottom:pxToRem(18px);
.tip{
// width: pxToRem(73px);
width: 16.666%;
display: inline-block;
// margin-right: pxToRem(24px);
img{
width: pxToRem(48px);
height: pxToRem(48px);
margin-bottom: pxToRem(10px);
}
.caption{
display: block;
font-size: pxToRem(18px);
line-height: pxToRem(22px);
margin-bottom: pxToRem(18px);
}
}
}
.product-detail {
... ... @@ -84,11 +115,8 @@
.measurement-method {
.detail {
width: 100%;
height: pxToRem(260px);
img {
float: left;
width: 100%;
height: pxToRem(239px);
margin-top: pxToRem(18px);
margin-right: pxToRem(28px);
}
... ...
... ... @@ -72,14 +72,9 @@
{{#list}}
{{#if @first}}
<div class="swiper-slide first-group" >
{{#params}}
{{#if @first}}
{{else}}
<img class="lazy avatar" data-original="{{param}}" />
{{/if}}
{{/params}}
</div>
{{^}}
{{else}}
<div class="swiper-slide" >
{{#params}}
<div class=" cell">{{param}}</div>
... ... @@ -104,16 +99,28 @@
<span class="en-title">{{enTitle}}</span>
</h1>
<div class="detail">
<img class="lazy" data-original="{{img}}" alt="">
<p class="material-desc">
{{desc}}
</p>
{{#list}}
<div class="material-item">
<img class="lazy" data-original="{{img}}" alt="">
<p class="material-desc">
{{desc}}
</p>
</div>
{{/list}}
</div>
<img class="lazy material-type" data-original="{{materialType}}" alt="" >
</div>
{{/materials}}
{{#washTips}}
<div class="wash-tips page-block">
{{#washTips}}
<div class="tip">
<img src="{{img}}" alt="">
<span class="caption">{{caption}}</span>
</div>
{{/washTips}}
</div>
<!-- {{#washTips}}
<div class="icons-wrapper washTips page-block">
<ul class="icons-list clearfix">
{{#list}}
... ... @@ -121,7 +128,7 @@
{{/list}}
</ul>
</div>
{{/washTips}}
{{/washTips}} -->
<div class="gap-block"></div>
... ... @@ -133,7 +140,9 @@
</h1>
<div class="detail">
<p>{{desc}}</p>
{{#list}}
<img class="lazy" data-original="{{img}}" alt="">
{{/list}}
</div>
</div>
{{/productDetail}}
\ No newline at end of file
... ...
... ... @@ -83,7 +83,9 @@ class HomeController extends AbstractAction
'pageFooter' => true,
'favorite' => true,
'hasFavProduct' => $favProducts,
'hasFavBrand' => $favBrands
'productUrl' => '/product/new',
'hasFavBrand' => $favBrands,
'brandUrl' => '/product/new'
);
// 判断是否为品牌收藏页
if ($tab === 'brand') {
... ...