Authored by xuqi

new

... ... @@ -21,6 +21,33 @@
</div>
<div class="list-right pull-right">
{{# newMain}}
<div class="new-banner">
<a href="{{bannerHref}}">
<img src="{{banner}}">
</a>
</div>
<div class="new-brands clearfix">
<span class="iconfont pre">&#xe607;</span>
<div class="brands-wrap">
<ul class="brands">
{{# brands}}
<li>
<a href="{{href}}">
<img src="{{logo}}">
</a>
</li>
{{/ brands}}
</ul>
</div>
<span class="iconfont next">&#xe608;</span>
</div>
<div class="new-floor-title">
<span class="date">{{date}}</span>
<span class="title">{{title}}</span>
</div>
{{/ newMain}}
{{> product/standard-content}}
</div>
</div>
... ...
... ... @@ -15,4 +15,54 @@ require('./product');
//最近浏览的商品Lazyload
lazyLoad($('.latest-walk .lazy'));
\ No newline at end of file
lazyLoad($('.latest-walk .lazy'));
(function() {
var $brands = $('.brands');
var wrapWidth,
$firstBrand,
totalWidth,
perWidth;
if ($brands.length === 0) {
return;
}
wrapWidth = $('.brands-wrap').width();
$firstBrand = $brands.children('li:first-child');
perWidth = $firstBrand.width() + $firstBrand.css('margin-left').replace('px', '') * 1;
totalWidth = perWidth * $brands.children('li').length;
//针对NEW页面Header的brand banner切换
$('.new-brands').on('click', '.pre,.next', function() {
var $this = $(this),
left;
left = $brands.css('left');
if (left === 'auto') {
left = 0;
} else {
left = +left.replace('px', '');
}
if (($this).hasClass('pre')) {
//左边界
if (left + wrapWidth > 0) {
return;
}
$brands.css('left', left + wrapWidth + 'px');
} else {
//右边界
if (left - wrapWidth < -totalWidth) {
return;
}
$brands.css('left', left - wrapWidth + 'px');
}
});
}());
\ No newline at end of file
... ...
... ... @@ -28,4 +28,110 @@
border-top: 1px dotted #999;
}
}
.new-banner img {
display: block;
width: 100%;
}
.new-brands {
position: relative;
width: 100%;
margin-top: 25px;
> * {
float: left;
}
.pre, .next {
position: absolute;
display: block;
width: 40px;
height: 40px;
line-height: 40px;
color: #fff;
background: #e0e0e0;
text-align: center;
top: 50%;
margin-top: -20px;
cursor: pointer;
opacity: 0.8;
filter: Alpha(opacity=80);
&:hover {
opacity: 0.9;
filter: Alpha(opacity=90);
}
}
.pre {
left: 0;
}
.next {
right: 0;
}
.brands-wrap {
position: relative;
overflow: hidden;
width: 890px;
height: 76px;
margin-left: 40px;
}
.brands {
position: absolute;
width: auto;
height: 76px;
}
.brands li {
float: left;
margin-left: 14px;
a {
display: block;
width: 164px;
height: 76px;
line-height: 76px;
vertical-align: middle;
text-align: center;
}
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
border: none;
}
}
}
.new-floor-title {
position: relative;
margin: 35px auto;
width: 300px;
height: 31px;
line-height: 31px;
font-size: 18px;
border: 1px solid #000;
.date {
position: absolute;
left: -1px;
top: -1px;
width: 155px;
height: 33px;
color: #fff;
text-align: center;
background: image-url('product/floor-title.png');
}
.title {
float: right;
margin-right: 40px;
}
}
}
\ No newline at end of file
... ...
... ... @@ -958,6 +958,7 @@ class IndexController extends AbstractAction
public function newSaleAction()
{
$data = array(
'productListPage' => true,
'newSale' => array(
'banner' => array(
'bannerHeight' => 350,
... ... @@ -966,358 +967,389 @@ class IndexController extends AbstractAction
'title' => array(
'name' => '全部商品',
'count' => 540
)
),
'filters' => array(
'checkedConditions' => array(
'conditions' => array(
),
'newMain' => array(
'banner' => 'http://img11.static.yhbimg.com/yhb-img01/2015/11/23/07/010a459d41b99a839cba9377532f1c19b2.jpg?imageView/3/w/970/h/200',
'date' => '12月16日',
'title' => '新品到着',
'brands' => array(
array(
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/02/28/15/02b2b5ded161ab31e2e097a327ed475052.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/11/09/09/023721f44182f775d79904010af421331e.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2012/12/13/17/01408fb72646c8f3fa59d870514f08a356.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'name' => '暗黑'
'logo' => 'http://img13.static.yhbimg.com/brandLogo/2012/12/24/13/0265b45e37af697c5ba12d5415fb341f27.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'color' => '#f00'
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/08/11/15/012d09a5cae187af1f6f3ed246b9b5a4fc.jpg?imageView/2/w/170/h/120'
),
array(
'href' => '',
'name' => 'CLOT'
'logo' => 'http://img11.static.yhbimg.com/brandLogo/2015/08/20/16/01047ffb3ca182871821d551af31ac2378.jpg?imageView/2/w/170/h/120'
)
),
'clearUrl' => ''
),
'channel' => array(
array(
'href' => '/?gender=1,3',
'name' => 'BOYS'
),
array(
'href' => '/?gender=2,3',
'name' => 'GIRLS'
),
array(
'href' => '',
'name' => 'KIDS'
),
array(
'href' => '',
'name' => 'LIFESTYLE'
)
),
'sort' => array(
array(
'id' => '1',
'name' => '上衣',
'sub' => array(
'filters' => array(
'checkedConditions' => array(
'conditions' => array(
array(
'href' => '',
'name' => 'T恤'
'name' => '暗黑'
),
array(
'href' => '',
'name' => '棉袄'
'color' => '#f00'
),
array(
'href' => '',
'name' => '外套'
'name' => 'CLOT'
)
)
),
array(
'id' => '2',
'name' => '裤子'
),
array(
'id' => '3',
'name' => '连衣裙'
),
'clearUrl' => ''
),
array(
'id' => '4',
'name' => '鞋'
)
),
'brand' => array(
'default' => array(
'channel' => array(
array(
'href' => '',
'name' => 'CLOT'
'href' => '/?gender=1,3',
'name' => 'BOYS'
),
array(
'href' => '',
'name' => 'ABLE JEANS'
'href' => '/?gender=2,3',
'name' => 'GIRLS'
),
array(
'href' => '',
'name' => 'Eight Guys'
'name' => 'KIDS'
),
array(
'href' => '',
'name' => 'FAIRWHALE JEANS'
'name' => 'LIFESTYLE'
)
),
'sort' => array(
array(
'id' => '1',
'name' => '上衣',
'sub' => array(
array(
'href' => '',
'name' => 'T恤'
),
array(
'href' => '',
'name' => '棉袄'
),
array(
'href' => '',
'name' => '外套'
)
)
),
array(
'href' => '',
'name' => '鬼洗'
'id' => '2',
'name' => '裤子'
),
array(
'href' => '',
'name' => '金银帝国Imperial Taels'
'id' => '3',
'name' => '连衣裙'
),
array(
'href' => '',
'name' => 'F.L.Y.D'
'id' => '4',
'name' => '鞋'
)
),
'brand' => array(
'default' => array(
array(
'href' => '',
'name' => 'CLOT'
),
array(
'href' => '',
'name' => 'ABLE JEANS'
),
array(
'href' => '',
'name' => 'Eight Guys'
),
array(
'href' => '',
'name' => 'FAIRWHALE JEANS'
),
array(
'href' => '',
'name' => '鬼洗'
),
array(
'href' => '',
'name' => '金银帝国Imperial Taels'
),
array(
'href' => '',
'name' => 'F.L.Y.D'
),
array(
'href' => '',
'name' => 'Tapenade特芙娜'
),
array(
'href' => '',
'name' => 'Adidas Originals'
)
),
'brandIndex' => array(
array(
'index' => 'all',
'name' => '全部'
),
array(
'index' => '0-9',
'name' => '0 ~ 9'
),
array(
'index' => 'a',
'name' => 'A'
)
),
'brandsShow' => array(
array(
'id' => '1',
'href' => '',
'index' => '0-9',
'name' => '5cm',
'key' => '5cm'
),
array(
'id' => '2',
'href' => '',
'index' => 'k',
'name' => 'KTZ',
'key' => 'ktz'
),
array(
'id' => '3',
'href' => '',
'index' => 't',
'name' => 'Tapenade特芙娜',
'key' => 'tapenade特芙娜'
),
array(
'id' => '4',
'href' => '',
'index' => 'j',
'name' => '金银帝国Imperial Taels',
'key' => '金银帝国imperial taels'
),
array(
'id' => '5',
'href' => '',
'index' => 'a',
'name' => 'ABLE JEANS',
'key' => 'able jeans'
)
)
),
'price' => array(
array(
'href' => '',
'name' => 'Tapenade特芙娜'
'name' => '0-239'
),
array(
'href' => '',
'name' => 'Adidas Originals'
'name' => '240-329'
)
),
'brandIndex' => array(
'color' => array(
array(
'index' => 'all',
'name' => '全部'
'href' => '',
'name' => '黑色',
'rgb' => '#000'
),
array(
'index' => '0-9',
'name' => '0 ~ 9'
'href' => '',
'name' => '红色',
'rgb' => '#f00'
)
),
'size' => array(
array(
'href' => '',
'name' => 'S'
),
array(
'index' => 'a',
'name' => 'A'
'href' => '',
'name' => 'L'
)
),
'brandsShow' => array(
'seniorChose' => array(
array(
'id' => '1',
'href' => '',
'index' => '0-9',
'name' => '5cm',
'key' => '5cm'
'attr' => 'style',
'name' => '风格',
'showMulti' => true,
'sub' => array(
array(
'id' => '1',
'href' => '',
'name' => '街头'
),
array(
'id' => '2',
'href' => '',
'name' => '简约'
)
)
),
array(
'id' => '2',
'attr' => 'weather',
'name' => '适用季节',
'sub' => array(
array(
'id' => '1',
'href' => '',
'name' => '春天'
),
array(
'id' => '2',
'href' => '',
'name' => '夏天'
)
)
)
)
),
'opts' => array(
'sortType' => array(
array(
'href' => '',
'index' => 'k',
'name' => 'KTZ',
'key' => 'ktz'
'name' => '默认'
),
array(
'id' => '3',
'active' => true,
'href' => '',
'index' => 't',
'name' => 'Tapenade特芙娜',
'key' => 'tapenade特芙娜'
'name' => '最新',
'hasSortOrient' => true,
'desc' => true
),
array(
'id' => '4',
'href' => '',
'index' => 'j',
'name' => '金银帝国Imperial Taels',
'key' => '金银帝国imperial taels'
'name' => '价格',
'hasSortOrient' => true
),
array(
'id' => '5',
'href' => '',
'index' => 'a',
'name' => 'ABLE JEANS',
'key' => 'able jeans'
'name' => '折扣',
'hasSortOrient' => true
)
)
),
'price' => array(
array(
'href' => '',
'name' => '0-239'
),
array(
'href' => '',
'name' => '240-329'
)
),
'color' => array(
array(
'href' => '',
'name' => '黑色',
'rgb' => '#000'
),
array(
'href' => '',
'name' => '红色',
'rgb' => '#f00'
)
),
'size' => array(
array(
'href' => '',
'name' => 'S'
),
array(
'href' => '',
'name' => 'L'
)
),
'seniorChose' => array(
array(
'attr' => 'style',
'name' => '风格',
'showMulti' => true,
'sub' => array(
array(
'id' => '1',
'href' => '',
'name' => '街头'
),
array(
'id' => '2',
'href' => '',
'name' => '简约'
)
'checks' => array(
array(
'name' => '新品',
'checked' => true,
'href' => ''
),
array(
'name' => '打折',
'href' => ''
),
array(
'name' => '限量',
'checked' => true,
'href' => ''
)
),
array(
'attr' => 'weather',
'name' => '适用季节',
'sub' => array(
array(
'id' => '1',
'href' => '',
'name' => '春天'
),
array(
'id' => '2',
'href' => '',
'name' => '夏天'
)
'fivePerLine' => true,
'sixPerLineHref' => '',
'countPerPage' => '120',
'pageCounts' => array(
array(
'href' => '',
'count' => 60
),
array(
'href' => '',
'count' => 100
),
array(
'href' => '',
'count' => 120
)
)
)
),
'opts' => array(
'sortType' => array(
array(
'href' => '',
'name' => '默认'
),
array(
'active' => true,
'href' => '',
'name' => '最新',
'hasSortOrient' => true,
'desc' => true
),
array(
'href' => '',
'name' => '价格',
'hasSortOrient' => true
),
array(
'href' => '',
'name' => '折扣',
'hasSortOrient' => true
)
'curPage' => 1,
'pageCount' => 30,
'nextHref' => 'hello'
),
'checks' => array(
'goods' => array(
array(
'name' => '新品',
'checked' => true,
'href' => ''
'tags' => array(
'isNew' => true,
'isYearEndPromotion' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
),
array(
'name' => '打折',
'href' => ''
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
),
array(
'name' => '限量',
'checked' => true,
'href' => ''
)
),
'fivePerLine' => true,
'sixPerLineHref' => '',
'countPerPage' => '120',
'pageCounts' => array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'href' => '',
'count' => 60
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'href' => '',
'count' => 100
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'href' => '',
'count' => 120
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
)
),
'curPage' => 1,
'pageCount' => 30,
'nextHref' => 'hello'
),
'goods' => array(
array(
'tags' => array(
'isNew' => true,
'isYearEndPromotion' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'isFew' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899',
'showColBtn' => true
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
),
array(
'tags' => array(
'isNew' => true,
'isReNew' => true
),
'url' => 'http://adidas.yohobuy.com/?gender=1,3',
'thumb' => 'http://img12.static.yhbimg.com/goodsimg/2015/11/22/03/02c17af44dc23aa5a62d61cb59a05380bc.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
'name' => 'adidas Originals FORUM 中帮拼色休闲板鞋',
'salePrice' => '899'
)
),
'totalCount' => '2259',
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">&gt;</span></a>'
'totalCount' => '2259',
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">&gt;</span></a>'
)
);
$this->_view->display('new-sale', $data);
... ...