Authored by xuqi

latest walk

... ... @@ -144,6 +144,7 @@
</div>
</div>
{{> product/pager}}
{{> product/latest-walk}}
</div>
{{/ brandAbout}}
</div>
... ...
{{#if latestWalk}}
<div class="latest-walk">
<h2>最近浏览的商品</h2>
<div class="goods clearfix">
{{# latestWalk}}
<div class="good">
<a href="{{href}}">
<img class="lazy" data-original="{{img}}">
</a>
<a class="name" href="{{href}}">{{name}}</a>
<p class="price">
{{#if salePrice}}
<span class="market-price">¥{{marketPrice}}</span>
{{/if}}
<span class="sale-price">¥{{salePrice}}</span>
</p>
</div>
{{/ latestWalk}}
</div>
</div>
{{/if}}
\ No newline at end of file
... ...
... ... @@ -4,8 +4,15 @@
* @date: 2015/11/23
*/
var $ = require('yoho.jquery'),
lazyLoad = require('yoho.lazyload');
require('./filter');
require('./sort-pager');
require('./product');
\ No newline at end of file
require('./product');
//最近浏览的商品Lazyload
lazyLoad($('.latest-walk .lazy'));
\ No newline at end of file
... ...
@import "search", "list", "filter-box", "sort-pager", "good";
@import "search", "list", "filter-box", "sort-pager", "good", "latest-walk";
.product-pager {
padding: 20px 0;
font-size: 12px;
color: #6a6a6a;
border-top: 1px solid #e7e9e8;
border-top: 2px solid #eaeceb;
.pager {
float: right;
... ...
.latest-walk {
overflow: hidden;
border-top: 2px solid #eaeceb;
font-size: 12px;
h2 {
padding-top: 15px;
font-size: 14px;
}
.goods {
width: 984px;
margin: 30px 0;
}
.good {
float: left;
margin-right: 14px;
}
img {
display: block;
width: 150px;
height: 201px;
}
.name {
display: block;
height: 18px;
line-height: 18px;
max-width: 150px;
margin: 5px 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.market-price {
color: #999;
margin-right: 5px;
text-decoration: line-through;
}
.sale-price {
color: #000;
font-weight: bold;
}
}
\ No newline at end of file
... ...
... ... @@ -896,7 +896,45 @@ class IndexController extends AbstractAction
)
),
'totalCount' => '2259',
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="ifont10">&gt;</span></a>'
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="iconfont">&gt;</span></a>',
'latestWalk' => array(
array(
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/08/24/11/018fd5cbe604b37ea35336257fcbff8114.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'Life·After Life 牛角扣夹棉连帽大衣(M51款)【吴亦凡亲身试着】',
'marketPrice' => '939',
'salePrice' => '679'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
),
array(
'img' => 'http://img10.static.yhbimg.com/goodsimg/2014/11/05/08/0110a09053658b079265a553ee20a5779d.jpg?imageMogr2/thumbnail/195x260/extent/195x260/background/d2hpdGU=/position/center/quality/90',
'name' => 'th:字母撞色毛衣',
'marketPrice' => '698',
'salePrice' => '209'
)
)
)
);
... ...