Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
Plain Diff
Browse Files
Authored by
xuqi
9 years ago
Commit
709a5030210fa3cc102c88f4adc541ac200521c1
2 parents
0e987d40
02f651aa
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
15 deletions
static/js/category/brand.js
static/sass/_good.scss
static/sass/category/_brand.scss
static/sass/product/_new-arrival.scss
template/m.yohobuy.com/actions/category/brand/index.phtml
static/js/category/brand.js
View file @
709a503
...
...
@@ -11,6 +11,10 @@ var $ = require('yoho.zepto'),
var
swiper
,
$brandList
=
$
(
'.brand-list'
);
var
searchH
=
$
(
'.newbrand-search'
).
height
(),
headerH
=
$
(
'.yoho-header'
).
height
(),
brandSwipe
=
parseInt
(
searchH
)
+
parseInt
(
headerH
);
swiper
=
new
Swiper
(
'.swiper-container'
,
{
lazyLoading
:
true
,
loop
:
true
,
...
...
@@ -27,14 +31,9 @@ $('.banner-top').css('padding-top', '90px');
if
(
$brandList
.
length
>
0
)
{
$
(
window
).
scroll
(
function
()
{
var
scrTop
=
$
(
window
).
scrollTop
(),
searchH
=
$
(
'.newbrand-search'
).
height
(),
headerH
=
$
(
'.yoho-header'
).
height
(),
brandSwipe
=
parseInt
(
searchH
)
+
parseInt
(
headerH
);
var
scrTop
=
$
(
window
).
scrollTop
();
$
(
'.brand-list'
).
each
(
function
()
{
var
offTop
=
$
(
this
).
offset
().
top
-
brandSwipe
;
if
(
scrTop
>=
offTop
)
{
$brandList
.
find
(
'.title-bar'
).
css
(
'position'
,
'static'
);
$
(
this
).
find
(
'.title-bar'
).
css
({
...
...
@@ -47,3 +46,11 @@ if ($brandList.length > 0) {
});
});
}
$
(
'#right-bar .con'
).
find
(
'b'
).
unbind
().
on
(
'tap'
,
function
(){
var
index
=
$
(
this
).
index
();
if
(
$
(
'.bar-'
+
index
).
size
()
>
0
){
document
.
body
.
scrollTop
=
parseInt
(
$
(
'.bar-'
+
index
)[
0
].
offsetTop
)
-
parseInt
(
brandSwipe
-
1
);
}
});
...
...
static/sass/_good.scss
View file @
709a503
.good-info
{
display
:
inline-block
;
width
:
276rem
/
$pxConvertRem
;
float
:
left
;
width
:
44%
;
height
:
486rem
/
$pxConvertRem
;
margin
:
28rem
/
$pxConvertRem
(
15rem
/
$pxConvertRem
)
0
;
margin
:
28rem
/
$pxConvertRem
3%
0
;
.tag-container
{
...
...
static/sass/category/_brand.scss
View file @
709a503
...
...
@@ -111,17 +111,18 @@
.right-bar
{
width
:
60rem
/
$pxConvertRem
;
top
:
240rem
/
$pxConvertRem
!
important
;
overflow
:
hidden
;
height
:
75%
;
top
:
20%
;
overflow
:
auto
;
position
:
fixed
;
right
:
2rem
/
$pxConvertRem
;
border-radius
:
12rem
/
$pxConvertRem
;
background
:
rgba
(
0
,
0
,
0
,.
8
);
z-index
:
2
;
b
{
height
:
3
2
rem
/
$pxConvertRem
;
height
:
3
6
rem
/
$pxConvertRem
;
line-height
:
28
rem
/
$pxConvertRem
;
line-height
:
36
rem
/
$pxConvertRem
;
text-align
:
center
;
display
:
block
;
color
:
#999999
;
...
...
static/sass/product/_new-arrival.scss
View file @
709a503
...
...
@@ -83,7 +83,6 @@
.goods-container
{
position
:
relative
;
min-height
:
440px
;
text-align
:
center
;
}
}
...
...
template/m.yohobuy.com/actions/category/brand/index.phtml
View file @
709a503
...
...
@@ -32,7 +32,7 @@
{
{/
hotBrand
}
}
{
{#
brandList
}
}
<div
class=
"brand-list"
>
<div
class=
"brand-list
bar-{{@index}}
"
>
<div
class=
"title-bar"
>
<h
2
style=
"position: static;"
>
{
{title
}
}</h
2
>
</div>
...
...
Please
register
or
login
to post a comment