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
3bf69fb8
authored
2021-01-20 11:31:30 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:办事指南
1 parent
10378774
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
36 deletions
staticCss/ggxq.css
staticJs/businessGuideDeatil.js
staticJs/pageHome.js
staticCss/ggxq.css
View file @
3bf69fb
...
...
@@ -162,6 +162,7 @@ div.navigation {
color
:
#006cff
;
font-size
:
16px
;
margin-right
:
10px
;
cursor
:
pointer
;
}
.download-attachment
a
:hover
{
color
:
#006cff
;
...
...
staticJs/businessGuideDeatil.js
View file @
3bf69fb
...
...
@@ -8,7 +8,7 @@ $(function () {
downLoad
()
})
function
downLoad
()
{
$
(
'.
item_notice
a'
).
click
(
function
()
{
$
(
'.
download-attachment
a'
).
click
(
function
()
{
var
url
=
$
(
this
).
attr
(
'url'
)
var
ua
=
navigator
.
userAgent
;
if
(
/chrome/i
.
test
(
ua
))
{
...
...
staticJs/pageHome.js
View file @
3bf69fb
...
...
@@ -55,7 +55,7 @@ $(function () {
addTabs
(
'#index'
);
initData
();
recentlyDay
=
getDate
();
//
NewsData();
NewsData
();
// NoticeData();
// LawsData();
// policiesData();
...
...
@@ -74,40 +74,40 @@ function initData() {
}
//加载新闻数据
function
NewsData
()
{
var
ulNews
=
$
(
"#ulNews"
);
ulNews
.
empty
();
var
li
,
publishTime
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/MhNews/getNewsList"
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
if
(
result
.
data
[
0
].
preViewUrl
)
{
$
(
'.news-img img'
).
attr
(
'src'
,
result
.
data
[
0
].
preViewUrl
);
}
else
{
$
(
'.news-img img'
).
attr
(
'src'
,
'./staticImages/news_demo.jpg'
);
}
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
if
(
i
==
6
)
return
;
publishTime
=
CutDate
(
result
.
data
[
i
].
publishTime
);
if
(
result
.
data
[
i
].
preViewUrl
)
{
li
=
'<li url="'
+
result
.
data
[
i
].
preViewUrl
+
'"><a href="./staticViews/news/'
+
result
.
data
[
i
].
id
+
'.html" title="'
+
result
.
data
[
i
].
headline
+
'" target="_blank">'
;
}
else
{
li
=
'<li><a href="./staticViews/news/'
+
result
.
data
[
i
].
id
+
'.html" 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>'
;
}
li
+=
result
.
data
[
i
].
headline
+
'</div>'
;
li
+=
'<span>'
+
publishTime
+
'</span></a></li>'
;
ulNews
.
append
(
li
);
}
}
}
});
//
var ulNews = $("#ulNews");
//
ulNews.empty();
//
var li, publishTime;
//
$.ajax({
//
type: "get", //提交方式
//
url: portal.api_url + "/portal/MhNews/getNewsList",//路径
//
dataType: "json",
//
//数据,这里使用的是Json格式进行传输
//
success: function (result) {//返回数据根据结果进行相应的处理
//
if (result.code == 200 && result.data != null) {
//
if (result.data[0].preViewUrl) {
//
$('.news-img img').attr('src', result.data[0].preViewUrl);
//
} else {
//
$('.news-img img').attr('src', './staticImages/news_demo.jpg');
//
}
//
for (var i = 0; i < result.data.length; i++) {
//
if (i == 6) return;
//
publishTime = CutDate(result.data[i].publishTime);
//
if (result.data[i].preViewUrl) {
//
li = '<li url="' + result.data[i].preViewUrl + '"><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">';
//
} else {
//
li = '<li><a href="./staticViews/news/' + result.data[i].id + '.html" 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>';
//
}
//
li += result.data[i].headline + '</div>';
//
li += '<span>' + publishTime + '</span></a></li>';
//
ulNews.append(li);
//
}
//
}
//
}
//
});
$
(
document
).
on
(
"mouseover"
,
"#ulNews li"
,
function
(
e
)
{
if
(
$
(
this
).
attr
(
'url'
))
{
...
...
Please
register
or
sign in
to post a comment