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
Email Patches
Plain Diff
Browse Files
Authored by
wangqing
9 years ago
Commit
90511273f729d4599346a5e87120c3300d9917ff
1 parent
df90f22f
限制请求数据
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
web-static/js/header.js
web-static/js/header.js
View file @
9051127
...
...
@@ -720,27 +720,33 @@ function actionNav() {
});
}
function
actionTipPic
()
{
var
$content_code
=
''
var
tipscode
=
{};
var
$contentcode
=
''
;
var
serverApi
=
'http://www.yohobuy.com/common/getbanner?content_code='
;
var
$img
=
''
;
var
$title
=
''
;
var
$link
=
''
;
$
(
document
).
on
(
'mouseenter'
,
'.sub-nav-item'
,
function
(){
$content_code
=
$
(
this
).
find
(
'.showdetail'
).
attr
(
'data-code'
);
if
(
$content_code
){
$
(
document
).
on
(
'mouseenter'
,
'.sub-nav-item'
,
function
()
{
$contentcode
=
$
(
this
).
find
(
'.showdetail'
).
attr
(
'data-code'
);
if
(
$contentcode
)
{
if
(
!
tipscode
[
$contentcode
]){
tipscode
[
$contentcode
]
=
$contentcode
;
$img
=
$
(
this
).
find
(
'.showdetail'
).
find
(
'img'
);
$title
=
$
(
this
).
find
(
'.showdetail'
).
find
(
'.title'
);
$link
=
$
(
this
).
find
(
'.showdetail'
).
find
(
'a'
);
$
.
get
(
serverApi
+
$content_code
+
'&width=337&height=250&client_type=web'
,
function
(
rsdata
)
{
$img
.
attr
(
'src'
,
rsdata
.
data
.
src
);
$link
.
attr
(
'href'
,
rsdata
.
data
.
url
);
$
.
get
(
serverApi
+
$contentcode
+
'&width=337&height=250&client_type=web'
,
function
(
rsdata
)
{
$img
.
attr
(
'src'
,
rsdata
.
data
.
src
);
$link
.
attr
(
'href'
,
rsdata
.
data
.
url
);
$title
.
text
(
rsdata
.
data
.
title
);
},
'jsonp'
);
}
})
}
});
}
...
...
@@ -1348,7 +1354,7 @@ function actionLoginInfo() {
*/
function
init
()
{
actionNav
();
//处理导航
actionTipPic
();
//鼠标移入后查询
actionTipPic
();
//鼠标移入后查询
actionExeTemplate
();
//处理模板
actionInitCookie
();
//初始化cookie
actionExeCookieMap
();
//格式化cookie
...
...
Please
register
or
login
to post a comment