Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
be7ec0ba
authored
2020-12-25 17:36:22 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:新闻
1 parent
619e6cc9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
staticJs/pageHome.js
staticJs/pageHome.js
View file @
be7ec0b
...
...
@@ -73,7 +73,7 @@ function NewsData() {
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
if
(
i
==
6
)
return
;
publishTime
=
CutDate
(
result
.
data
[
i
].
publishTime
);
li
=
'<li><a href="./staticViews/xwxq.html?id='
+
result
.
data
[
i
].
id
+
'" title="'
+
result
.
data
[
i
].
headline
+
'" target="_blank">'
;
li
=
'<li
url="'
+
result
.
data
[
i
].
cover
+
'"
><a href="./staticViews/xwxq.html?id='
+
result
.
data
[
i
].
id
+
'" title="'
+
result
.
data
[
i
].
headline
+
'" target="_blank">'
;
li
+=
'<div class="news_item">'
;
if
(
recentlyDay
.
indexOf
(
publishTime
)
>
-
1
)
{
li
+=
'<svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzuixin"></use> </svg>'
;
...
...
@@ -82,10 +82,22 @@ function NewsData() {
li
+=
'<span>'
+
publishTime
+
'</span></a></li>'
;
ulNews
.
append
(
li
);
}
if
(
result
.
data
[
0
].
cover
)
{
$
(
'.news-img img'
).
attr
(
'src'
,
result
.
data
[
0
].
cover
);
}
else
{
$
(
'.news-img img'
).
attr
(
'src'
,
'staticImages/news_demo.jpg'
);
}
}
}
});
$
(
document
).
on
(
"mouseover"
,
"#ulNews li"
,
function
(
e
)
{
if
(
$
(
this
).
attr
(
'url'
))
{
$
(
'.news-img img'
).
attr
(
'src'
,
$
(
this
).
attr
(
'url'
));
}
else
{
$
(
'.news-img img'
).
attr
(
'src'
,
'staticImages/news_demo.jpg'
);
}
})
}
//加载公告数据
...
...
Please
register
or
sign in
to post a comment