Authored by lore-w

列表页990适配

... ... @@ -80,6 +80,14 @@
{{#each goods}}
{{> product/good}}
{{/each}}
{{# hasNextPage}}
<div class="block-next-page">
<a href="{{href}}">
<img src="{{src}}" alt=""/>
</a>
</div>
{{/ hasNextPage}}
<div class="good-item-wrapper">
<div class="good-info-main"></div>
<div class="good-select-color"></div>
... ...
... ... @@ -104,17 +104,19 @@ exports.init = function(num) {
wrapperPt = $goodItemWrapper.css('paddingTop');
containerPt = $goodsContainer.css('paddingTop');
wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
//wrapperWidth = 10 + (15 + 50) * ulNum + event.targetWidth;
wrapperWidth = $goodItemWrapper.width();
wrapperX = (event.targetX - 1) * (event.targetWidth + itemMr) - (parseInt(wrapperPl) + 1);
wrapperY = (event.targetY - 1) *
(event.targetHeight + itemMb) + parseInt(containerPt) - (parseInt(wrapperPt) + 1);
//todo
//event.offsetR表示当前列表距离浏览器右侧边缘的距离
diffWidth = event.offsetR - ((15 + 50) * ulNum + 25);
if (diffWidth <= 0) {
wrapperX = wrapperX + diffWidth;
wrapperX = wrapperX + diffWidth - 25;
}
$goodItemWrapper.css({
width: wrapperWidth,
... ...
... ... @@ -139,4 +139,27 @@
.good-info {
margin-right: 10px;
}
}
/*next page*/
.block-next-page {
width: 222px;
height: 297px;
padding-top: 22px;
margin-bottom: 35px;
margin-right: 10px;
float: left;
cursor: pointer;
a {
display: block;
img {
width: 100%;
height: 100%;
display: block;
overflow: hidden;
}
}
}
\ No newline at end of file
... ...
@import "search", "list", "new-sale", "filter-box", "sort-pager", "good", "latest-walk", "left-content";
.product-page {
/*分页*/
.product-pager {
padding: 20px 0;
font-size: 12px;
... ... @@ -11,6 +13,7 @@
float: right;
}
}
/*分页 END*/
.list-left {
width: 160px;
... ... @@ -21,8 +24,7 @@
}
}
.product-list-page,
.new-sale-page {
.product-list-page, .new-sale-page {
.goods-container {
height: auto;
padding-top: 25px;
... ... @@ -32,11 +34,37 @@
.good-info {
width: 235px;
}
.block-next-page {
width: 235px;
height: 314px;
}
}
}
@media (max-width: 1180px) {
.product-page .list-right {
width: 810px;
.product-list-page, .new-sale-page {
.list-right {
width: 810px;
}
.goods-container {
height: auto;
padding-top: 25px;
position: relative;
width: 810px + 10px;//每列增加右边距
.good-info {
width: 195px;
height: 350px;
}
.block-next-page {
width: 195px;
height: 261px;
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -371,6 +371,10 @@ class IndexController extends AbstractAction
'salePrice' => '899'
)
),
'hasNextPage' => array(
'href' => '',
'src' => 'http://img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
),
'totalCount' => '2273',
'pager' => '<a href="" class="cur"><span>1</span></a><a href=""><span>2</span></a><a href="" title="下一页">下一页<span class="ifont10">&gt;</span></a>'
),
... ... @@ -767,6 +771,10 @@ class IndexController extends AbstractAction
'salePrice' => '899'
)
),
'hasNextPage' => array(
'href' => '',
'src' => 'http://img10.static.yhbimg.com/product/2014/01/15/11/01fa01614784f6239760f1b749663016f1.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90'
),
'leftContent' => array(
array(
'allSort' => array(
... ...