Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
lore-w
9 years ago
Commit
f0c164a10130c4a4ad8415e64795369a89f498fc
1 parent
fa4af4ca
列表页990适配
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
6 deletions
template/www.yohobuy.com/partials/product/standard-content.phtml
web-static/js/product/product.js
web-static/sass/product/_good.scss
web-static/sass/product/_index.scss
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
template/www.yohobuy.com/partials/product/standard-content.phtml
View file @
f0c164a
...
...
@@ -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>
...
...
web-static/js/product/product.js
View file @
f0c164a
...
...
@@ -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
,
...
...
web-static/sass/product/_good.scss
View file @
f0c164a
...
...
@@ -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
...
...
web-static/sass/product/_index.scss
View file @
f0c164a
@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
...
...
yohobuy/www.yohobuy.com/application/modules/Product/controllers/Index.php
View file @
f0c164a
...
...
@@ -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">></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
(
...
...
Please
register
or
login
to post a comment