Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
b591855f553c4ae80c38416f59bf34370a161602
2 parents
bfb595c3
91b6f68e
Merge branch 'develop' into test
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
30 deletions
static/js/home/home.js
static/sass/category/_brand.scss
static/sass/home/_side-nav.scss
static/sass/index/_search.scss
template/m.yohobuy.com/actions/guang/index/index.phtml
template/m.yohobuy.com/actions/guang/index/list.phtml
static/js/home/home.js
View file @
b591855
...
...
@@ -10,6 +10,7 @@ var $ = require('jquery'),
$mobileWrap
=
$
(
'.mobile-wrap'
),
$overlay
=
$
(
'.overlay'
),
$sideNav
=
$
(
'.side-nav'
),
$subNav
=
$
(
'.sub-nav'
),
bannerSwiper
,
recommendSwiper
,
hotBrandsSwiper
,
...
...
@@ -48,8 +49,7 @@ navHammer.on('tap', function(event) {
return
false
;
});
mobileWrapHammer
=
new
Hammer
(
$
(
'.mobile-wrap'
)[
0
]);
mobileWrapHammer
.
on
(
'tap'
,
function
(
e
)
{
function
hideSideBar
()
{
if
(
$mobileWrap
.
hasClass
(
'menu-open'
))
{
$mobileWrap
.
removeClass
(
'menu-open'
);
$overlay
.
css
(
'opacity'
,
0
);
...
...
@@ -62,28 +62,40 @@ mobileWrapHammer.on('tap', function(e) {
setTimeout
(
function
()
{
$
(
'.overlay'
).
hide
();
},
300
);
e
.
srcEvent
.
stopPropagation
();
return
false
;
}
}
mobileWrapHammer
=
new
Hammer
(
$
(
'.mobile-wrap'
)[
0
]);
mobileWrapHammer
.
on
(
'tap'
,
function
(
e
)
{
hideSideBar
();
e
.
srcEvent
.
stopPropagation
();
return
false
;
});
//点击一级导航,弹出二级导航
$sideNav
.
on
(
'touchend'
,
'li'
,
function
()
{
$sideNav
.
on
(
'touchend'
,
'li'
,
function
(
e
)
{
if
(
$
(
this
).
find
(
'.sub-nav'
).
size
()
>
0
)
{
$
(
'.sub-nav'
).
removeClass
(
'show'
);
$
(
this
).
find
(
'.sub-nav'
).
addClass
(
'show'
);
}
return
false
;
e
.
stopPropagation
();
if
(
e
.
target
.
pathname
===
location
.
pathname
)
{
hideSideBar
();
return
false
;
}
});
//返回一级导航,收起二级导航
$
(
'.sub-nav'
)
.
each
(
function
()
{
$
subNav
.
each
(
function
()
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'touchend'
,
function
(
e
)
{
$
(
'.sub-nav'
).
removeClass
(
'show'
);
e
.
stopPropagation
();
return
false
;
});
}).
on
(
'touchend'
,
function
()
{
$
(
'.sub-nav'
).
find
(
'li'
).
removeClass
(
'current'
);
}).
on
(
'touchend'
,
function
(
e
)
{
if
(
e
.
currentTarget
!==
e
.
target
)
{
$subNav
.
find
(
'li'
).
removeClass
(
'current'
);
}
});
//头部banner轮播
...
...
static/sass/category/_brand.scss
View file @
b591855
...
...
@@ -72,9 +72,10 @@
height
:
158rem
/
$pxConvertRem
;
.img-box
{
display
:
table-cell
;
vertical-align
:
middle
;
width
:
100%
;
height
:
100%
;
height
:
158rem
/
$pxConvertRem
;
}
}
}
...
...
static/sass/home/_side-nav.scss
View file @
b591855
.side-nav
{
display
:
block
;
background
:
#fff
;
position
:
fixed
;
top
:
0
;
right
:
640rem
/
$pxConvertRem
;
bottom
:
0
;
left
:
0
;
// left: 0;
right
:
640rem
/
$pxConvertRem
;
width
:
540rem
/
$pxConvertRem
;
z-index
:
-1
;
overflow
:
hidden
;
@include
transition
(
right
.3s
);
...
...
@@ -115,8 +117,9 @@
bottom
:
0
;
top
:
0
;
left
:
0
;
width
:
100%
;
width
:
540rem
/
$pxConvertRem
;
background
:
#fff
!
important
;
overflow
:
hidden
;
@include
transform
(
translateX
(
540rem
/
$pxConvertRem
));
@include
transition
(
transform
0
.3s
);
...
...
static/sass/index/_search.scss
View file @
b591855
.search-page
{
.search-input
{
position
:
relative
;
padding
:
7px
46
px
7px
15px
;
padding
:
7px
98
px
7px
15px
;
background
:
#f8f8f8
;
.search-icon
{
...
...
@@ -16,7 +16,7 @@
height
:
30px
;
width
:
100%
;
border-radius
:
15px
;
text-indent
:
26px
;
padding
:
0
26px
;
background
:
#fff
;
border
:
none
;
}
...
...
template/m.yohobuy.com/actions/guang/index/index.phtml
View file @
b591855
...
...
@@ -15,18 +15,6 @@
<div
class=
"swiper-pagination"
></div>
</div>
{
{#
authorInfo
}
}
<div
id=
"author-infos"
class=
"editor-header clearfix"
data-id=
{
{id
}
}>
<div
class=
"avatar"
>
<img
src=
"{{avatar}}"
>
</div>
<div
class=
"text"
>
<p
class=
"name"
>
{
{name
}
}</p>
<p
class=
"info"
>
{
{info
}
}</p>
</div>
</div>
{
{/
authorInfo
}
}
<ul
id=
"guang-nav"
class=
"guang-nav clearfix"
>
{
{#
navs
}
}
<li
class=
"guang-nav-item {{#focus}}focus{{/focus}}"
data-type=
{
{typeId
}
}>
...
...
template/m.yohobuy.com/actions/guang/index/list.phtml
View file @
b591855
{
{>
layout/header
}
}
<div
class=
"guang-list-page guang-page yoho-page"
>
{
{#
guang
}
}
{
{#
author
}
}
{
{#
author
Info
}
}
<div
id=
"author-infos"
class=
"editor-header clearfix"
data-id=
{
{id
}
}>
<div
class=
"avatar"
>
<img
src=
"{{avatar}}"
>
...
...
@@ -11,7 +11,7 @@
<p
class=
"info"
>
{
{info
}
}</p>
</div>
</div>
{
{/
author
}
}
{
{/
author
Info
}
}
<div
id=
"info-list"
class=
"info-list"
>
{
{#
infos
}
}
...
...
Please
register
or
login
to post a comment