Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
2016-10-19 14:46:22 +0800
Commit
5d7dc11923fb384a6d65b3cabf440ff957d30f1c
1 parent
3c57b073
头部频道前端选中调整
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
15 deletions
doraemon/views/partial/header.hbs
public/js/channel/channel.page.js
public/js/header.js
public/scss/common/_header.css
doraemon/views/partial/header.hbs
View file @
5d7dc11
{{#
headerData
}}
<div
id=
"yoho-header"
class=
"yoho-header
{{
headType
}}
"
data-type=
"
{{
headType
}}
"
>
<div
id=
"yoho-header"
class=
"yoho-header"
data-type=
"
{{
headType
}}
"
>
<div
class=
"tool-wrapper clearfix"
>
<div
class=
"center-content"
>
<div
class=
"yoho-group-map left"
>
...
...
@@ -66,7 +66,7 @@
<div
class=
"main-logo"
><a
href=
"//www.yohobuy.com/"
class=
"main-link"
></a></div>
<ul
class=
"main-nav-list"
>
{{#
navbars
}}
<li
class=
"
{{
type
}}{{#if
active
}}
cure
{{/if}}
"
{{#if
ico
}}
style=
"background: url(
{{
image
ico
54
32
}}
) no-repeat center center"
{{/if}}
>
<li
class=
"
{{
type
}}
"
{{#if
ico
}}
style=
"background: url(
{{
image
ico
54
32
}}
) no-repeat center center"
{{/if}}
>
{{#if
ico
}}
<a
href=
"
{{
link
}}
"
{{#if
isNewPage
}}
target=
"_blank"
{{/if}}
class=
"menu-ico"
></a>
{{^}}
...
...
@@ -80,7 +80,7 @@
</li>
{{/
navbars
}}
</ul>
<div
class=
"func-area"
>
<div
class=
"func-area
hide
"
>
<ul
class=
"search-suggest"
></ul>
<div
class=
"search-2016"
>
<form
action=
"//search.yohobuy.com"
method=
"get"
id=
"search-form"
>
...
...
@@ -109,7 +109,7 @@
<div
class=
"nav-wrapper clearfix"
>
<div
class=
"center-content"
>
{{#
subNavGroup
}}
<ul
class=
"sub-nav-list
{{
subType
}}
{{#if
active
}}
cure
{{/if}}
"
>
<ul
class=
"sub-nav-list
{{
subType
}}
"
>
{{#
subNav
}}
<li
{{#if
thirdNav
}}
class=
"contain-third"
{{/if}}
>
<a
href=
"
{{
link
}}
"
>
{{
name
}}
...
...
public/js/channel/channel.page.js
View file @
5d7dc11
...
...
@@ -9,6 +9,9 @@ var $ = require('yoho-jquery');
var
homePage
=
$
(
'.home-page'
).
data
(
'page'
),
brandUrl
=
$
(
'.logo-brand'
).
data
(
'url'
);
// 给头部js获取当前频道
window
.
homePage
=
homePage
;
require
(
'../common'
);
require
(
'../plugins/slider'
);
...
...
public/js/header.js
View file @
5d7dc11
...
...
@@ -487,20 +487,17 @@ function isSupportCss3Animation() {
function
syncPageChannel
()
{
var
$header
=
$
(
'#yoho-header'
),
$navs
;
var
channel
=
window
.
cookie
(
'_Channel'
)
||
'boys'
,
type
;
var
channel
=
window
.
homePage
||
window
.
cookie
(
'_Channel'
)
||
'boys'
,
qs
=
window
.
queryString
();
// 过滤频道页
if
(
$
(
'.home-page'
).
length
)
{
return
;
}
channel
=
qs
.
channel
?
qs
.
channel
:
channel
;
if
(
$header
&&
$header
.
length
)
{
$navs
=
$header
.
find
(
'.'
+
channel
);
type
=
$header
.
data
(
'type'
);
if
(
channel
===
type
||
!
$navs
.
length
)
{
return
;
if
(
!
$navs
.
length
)
{
channel
=
'boys'
;
$navs
=
$header
.
find
(
'.'
+
channel
);
}
// 更新频道菜单选中状态
...
...
@@ -508,7 +505,7 @@ function syncPageChannel() {
$navs
.
addClass
(
'cure'
);
// 更新频道颜色
$header
.
a
ttr
(
'class'
,
'yoho-header '
+
channel
);
$header
.
a
ddClass
(
channel
).
find
(
'.func-area'
).
removeClass
(
'hide'
);
// 更新三级菜单jq对象
$subNav
=
$
(
'.sub-nav-list.cure .contain-third'
);
...
...
public/scss/common/_header.css
View file @
5d7dc11
...
...
@@ -598,7 +598,6 @@
.nav-wrapper
{
height
:
40px
;
width
:
100%
;
background-color
:
#3a3a3a
;
position
:
relative
;
.sub-nav-list
{
...
...
@@ -726,6 +725,12 @@
}
}
.yoho-header.boys
{
.nav-wrapper
{
background-color
:
#3a3a3a
;
}
}
.yoho-header.girls
{
.search-2016
{
background-color
:
#ff88ae
;
...
...
Please
register
or
login
to post a comment