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
wangqing
9 years ago
Commit
2f310889668670815d6c5089d8efeec0338570e3
1 parent
035de69e
增加搜索关键字和new
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
template/www.yohobuy.com/partials/layout/page-header.phtml
web-static/js/header.js
template/www.yohobuy.com/partials/layout/page-header.phtml
View file @
2f31088
...
...
@@ -83,7 +83,11 @@
<ul
class=
"sub-nav-list"
>
{
{#
subnav
}
}
<li
class=
"sub-nav-item"
>
<a
href=
"{{link}}"
>
{
{name
}
}</a>
<a
href=
"{{link}}"
>
{
{name
}
}
{
{#if
is_new
}
}
<span
class=
"newlogo"
></span>
{
{/if
}
}
</a>
{
{#if
thirdnav
}
}
<div
class=
"third-nav-wrapper"
>
<div
class=
"third-nav"
>
...
...
@@ -96,7 +100,7 @@
{
{#branditems
}
}
<li
class=
"category-
item thirdnavbar"
>
<a
href=
"{{link}}"
hot=
{
{hot
}
}>
{
{brandname
}
}</a>
<a
href=
"{{link}}"
hot=
{
{hot
}
}
>
{
{brandname
}
}</a>
</li>
{
{/branditems
}
}
</ul>
...
...
web-static/js/header.js
View file @
2f31088
...
...
@@ -97,8 +97,35 @@ window.submitSearch = function() {
return
false
;
}
}
}
};
/**
* 增加关键字
* @return {[type]} [description]
*/
function
actionAddKeyWords
()
{
var
keywords
=
$
(
'#nav_keyword'
).
text
();
var
defaultsearch
=
'vans'
;
var
$query_key
=
$
(
'#query_key'
);
if
(
keywords
!==
''
)
{
$query_key
.
css
({
'color'
:
'#000'
});
$query_key
.
val
(
keywords
);
}
else
{
$query_key
.
css
({
'color'
:
'#e0e0e0'
});
$query_key
.
val
(
defaultsearch
);
$query_key
.
on
(
'focus'
,
function
(
e
)
{
$query_key
.
css
({
'color'
:
'#000'
});
$query_key
.
val
(
''
);
})
}
}
/**
* 定义购物车扩展
*/
...
...
@@ -1316,6 +1343,7 @@ function actionSearch() {
* @return {[type]} [description]
*/
function
actionLoginState
(
_data
)
{
console
.
log
(
_data
);
var
timestamp
=
new
Date
().
getTime
();
var
noLoginHtml
=
'<span>Hi~</span>[<a href="http://www.yohobuy.com/signin.html" class="list-a login-out ">'
+
'请登录</a>] '
+
...
...
@@ -1482,6 +1510,7 @@ function init() {
actionListenCartMore
();
//
actionLoginInfo
();
//获取登录信息
actionCover
();
//初次登录弹框
actionAddKeyWords
();
//增加关键字
}
init
();
\ No newline at end of file
...
...
Please
register
or
login
to post a comment