Authored by 毕凯

增加sale活动列表页面

{{> layout/header}}
<div class="sale-list-page new-sale-page product-page yoho-page">
{{# saleList}}
{{> sale/sale-banner}}
<div class="center-content clearfix">
{{#saleTitle}}
<div class="sale-title">
<span class="title">{{title}}</span>
{{#if discount}}
<span class="discount">{{discount}}</span>
{{/if}}
{{#if up}}
{{/if}}
<div class="time pull-right">
<span class="iconfont">&#xe60d;</span>{{time}}
</div>
</div>
{{/saleTitle}}
<ul class="sort">
<li class="title">分类:</li>
{{#sort}}
<li class="{{#if active}}active{{/if}}"><a href="#">{{name}}{{#if number}}({{number}}){{/if}}</a></li>
{{/sort}}
</ul>
{{> product/standard-content}}
</div>
{{/ saleList}}
</div>
{{> layout/footer}}
... ...
... ... @@ -75,6 +75,38 @@
</script>
{{/if}}
{{!-- sale列表 --}}
{{#if saleListPage}}
<script>
seajs.use(['js/product/list', 'js/product/product', 'js/sale/banner'], function (list, product) {
product.init(4);
window.onresize = function () {
setTimeout(function () {
product.init(4);
}, 300);
};
});
</script>
{{/if}}
{{!-- sale 分类列表 --}}
{{#if saleCatPage}}
<script>
seajs.use(['js/product/list', 'js/product/product', 'js/sale/banner'], function (list, product) {
product.init(4);
window.onresize = function () {
setTimeout(function () {
product.init(4);
}, 300);
};
});
</script>
{{/if}}
{{!-- 登录注册找回密码--}}
{{#if loginPage}}
<script>
... ... @@ -139,20 +171,3 @@
seajs.use('js/order/save');
</script>
{{/if}}
{{!-- sale列表 --}}
{{#if saleListPage}}
<script>
seajs.use(['js/product/list', 'js/product/product', 'js/product/banner'], function (list, product) {
product.init(4);
window.onresize = function () {
setTimeout(function () {
product.init(4);
}, 300);
};
});
</script>
{{/if}}
... ...
... ... @@ -345,3 +345,58 @@
}
}
}
.sale-list-page {
.sale-title {
margin: 30px 0;
font-size: 12px;
line-height: 26px;
.title {
margin-right: 20px;
font-size: 16px;
}
.discount {
display: inline-block;
margin-right: 10px;
padding: 0 10px;
font-weight: lighter;
line-height: 16px;
vertical-align: text-bottom;
color: #fff;
background: #ff575c;
}
.time {
.iconfont {
margin-right: 5px;
}
}
}
.sort {
padding: 10px;
border: 1px solid #eaeceb;
li {
display: inline-block;
margin-right: 15px;
padding: 0 10px;
font-size: 12px;
line-height: 20px;
color: #444;
&.title {
margin-right: 0;
font-weight: bold;
}
&.active {
color: #666;
border: 1px solid #000;
}
}
}
}
... ...
... ... @@ -405,6 +405,204 @@ class Sale1Controller extends WebAction
$this->_view->display('index', $data);
}
//分类列表页
public function saleCatAction()
{
$data = array(
'saleCatPage' => true,
'saleList' => array(
'saleBanner' => array(
'bannerHeight' => 350,
'list' => array(
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/couponImg/2015/12/10/08/02d4c26f19ca2e44359d69d5cff86167fb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/06/05/02062366574a01418596caa38a773f6beb.jpg'
),
array(
'bannerHeight' => 350,
'img' => 'http://img11.static.yhbimg.com/yhb-img01/2016/01/06/05/013341a0632177cc3425c3c6082845be57.jpg'
)
)
),
'saleTitle' => array(
'title' => 'SALE 精品上装专场',
'discount' => '8 折',
'time' => '1 天 20 小时 16 分 30 秒',
'up' => true
),
'sort' => array(
array(
'id' => '1',
'name' => '全部',
'number' => 3997,
'active' => true
),
array(
'id' => '2',
'name' => '上衣',
'number' => 89
),
array(
'id' => '3',
'name' => '裤子',
'number' => 29
),
array(
'id' => '4',
'name' => '连衣裙',
'number' => 399
),
array(
'id' => '5',
'name' => '鞋',
'number' => 399
)
),
'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
)
),
'checks' => array(
array(
'name' => '新品',
'checked' => true,
'href' => ''
),
array(
'name' => '打折',
'href' => ''
),
array(
'name' => '限量',
'checked' => true,
'href' => ''
)
),
'fivePerLine' => true,
'sixPerLineHref' => '',
'countPerPage' => '120',
'pageCounts' => array(
array(
'href' => '',
'count' => 60
),
array(
'href' => '',
'count' => 100
),
array(
'href' => '',
'count' => 120
)
),
'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>'
)
);
$this->setWebNavHeader();
$this->_view->display('sale-cat', $data);
}
//列表页
public function saleListAction()
{
... ...