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
6c4238fc
authored
2020-11-26 18:54:06 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:新闻详情
1 parent
5f9f0971
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
79 deletions
staticCss/gsgg.css
staticJs/gsgg.js
staticJs/xwdt.js
staticViews/gsgg.html
staticViews/xwdt.html
staticCss/gsgg.css
View file @
6c4238f
...
...
@@ -472,7 +472,7 @@ div.navigation {
}
.zcfg-bottom
{
width
:
90px
;
width
:
100%
;
height
:
12px
;
font-size
:
12px
;
color
:
#9B9B9B
;
...
...
staticJs/gsgg.js
View file @
6c4238f
...
...
@@ -13,16 +13,30 @@ $(function () {
elem
:
'#date'
});
})
initData
()
HotArticle
()
PolicyHotArticle
()
})
layui
.
use
(
'laypage'
,
function
()
{
var
laypage
=
layui
.
laypage
;
//执行一个laypage实例
laypage
.
render
({
elem
:
'test1'
//注意,这里的 test1 是 ID,不用加 # 号
,
count
:
50
//数据总数,从服务端得到
});
//门户公示公告列表
function
initData
(
currentPage
=
1
)
{
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/MhNotice/getNoticeList"
,
//路径
data
:
{
"currentPage"
:
currentPage
,
"pageSize"
:
data
.
limit
},
dataType
:
"json"
,
async
:
false
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
data
.
list
=
result
.
data
.
records
;
data
.
total
=
result
.
data
.
total
;
}
}
});
layui
.
use
(
'laytpl'
,
function
()
{
laytpl
=
layui
.
laytpl
;
var
getTpl
=
document
.
getElementById
(
'demo'
).
innerHTML
...
...
@@ -31,31 +45,78 @@ $(function () {
view
.
innerHTML
=
html
;
});
});
initData
()
})
}
//门户公示公告列表
function
initData
()
{
// 获取新闻动态的推荐数据
function
HotArticle
()
{
var
recommend
=
$
(
".news_recommendation"
);
recommend
.
empty
();
var
li
=
''
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/MhNotice/getNoticeList"
,
//路径
data
:{
"currentPage"
:
1
,
"pageSize"
:
6
},
url
:
portal
.
api_url
+
"/hlwj/MhNews/getNewsHotArticleList"
,
//路径
dataType
:
"json"
,
async
:
false
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
data
.
list
=
result
.
data
.
records
;
console
.
log
(
result
.
data
)
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li class="tj">'
;
li
+=
'<img src="'
+
result
.
data
[
i
].
cover
+
'">'
;
li
+=
'<span class="tj-title">'
+
result
.
data
[
i
].
headline
+
'</span>'
;
li
+=
'<span class="tj-date">'
+
result
.
data
[
i
].
deadtime
+
'</span>'
;
li
+=
'</li>'
;
recommend
.
append
(
li
);
}
}
});
}
})
}
// 政策法规推荐
function
PolicyHotArticle
()
{
var
regulation
=
$
(
"#regulation"
);
regulation
.
empty
();
var
li
=
''
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/hlwj/MhPolicy/getPolicyHotArticleList"
,
//路径
dataType
:
"json"
,
async
:
false
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li class="zcfg">'
li
+=
'<div class="zcfg-top">'
+
result
.
data
[
i
].
headline
+
'</div>'
li
+=
'<p class="zcfg-body">'
+
result
.
data
[
i
].
summary
+
'</p>'
li
+=
'<div class="zcfg-bottom">'
+
result
.
data
[
i
].
deadtime
+
'</div>'
li
+=
'</li>'
regulation
.
append
(
li
);
}
}
}
})
}
layui
.
use
(
'laypage'
,
function
()
{
var
laypage
=
layui
.
laypage
;
//执行一个laypage实例
laypage
.
render
({
elem
:
'test1'
//注意,这里的 test1 是 ID,不用加 # 号
,
count
:
data
.
total
//数据总数,从服务端得到
,
limit
:
data
.
limit
,
prev
:
'<'
,
next
:
'>'
,
theme
:
'#0091FF'
,
jump
:
function
(
obj
,
first
)
{
initData
(
obj
.
curr
);
}
});
});
var
data
=
{
//数据
"list"
:
[],
limit
:
10
,
total
:
undefined
};
\ No newline at end of file
...
...
staticJs/xwdt.js
View file @
6c4238f
...
...
@@ -83,7 +83,7 @@ function PolicyHotArticle() {
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li class="zcfg">'
li
+=
'<div class="zcfg-top">'
+
result
.
data
[
i
].
headline
+
'</div>'
li
+=
'<p class="zcfg-body">'
+
result
.
data
[
i
].
content
+
'</p>'
li
+=
'<p class="zcfg-body">'
+
result
.
data
[
i
].
summary
+
'</p>'
li
+=
'<div class="zcfg-bottom">'
+
result
.
data
[
i
].
deadtime
+
'</div>'
li
+=
'</li>'
regulation
.
append
(
li
);
...
...
staticViews/gsgg.html
View file @
6c4238f
...
...
@@ -50,48 +50,15 @@
<div
class=
"listArea_right"
>
<ul
class=
"rightcontainer"
>
<h2
class=
"right-top"
>
新闻推荐
</h2>
<li
class=
"tj"
>
<img
src=
"https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"
>
<span
class=
"tj-title"
>
爬山虎国土空间信息化解决方案
</span>
<span
class=
"tj-date"
>
2020-12-12
</span>
</li>
<li
class=
"tj"
>
<img
src=
"https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"
>
<span
class=
"tj-title"
>
爬山虎国土空间信息化解决方案
</span>
<span
class=
"tj-date"
>
2020-12-12
</span>
</li>
<div
class=
"news_recommendation"
></div>
</ul>
<ul
class=
"diver"
>
<li></li>
</ul>
<ul
class=
"rightcontainer"
>
<h2
class=
"zc-top"
>
政策法规
</h2>
<li>
<div
class=
"zcfg"
>
<div
class=
"zcfg-top"
>
爬山虎国土空间规划信息化解决
</div>
<div
class=
"zcfg-body"
>
10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。
<div
id=
"regulation"
>
</div>
<div
class=
"zcfg-bottom"
>
2020-10-28
</div>
</div>
</li>
<li>
<div
class=
"zcfg"
>
<div
class=
"zcfg-top"
>
爬山虎国土空间规划信息化解决
</div>
<div
class=
"zcfg-body"
>
10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。
</div>
<div
class=
"zcfg-bottom"
>
2020-10-28
</div>
</div>
</li>
</ul>
</div>
</div>
...
...
staticViews/xwdt.html
View file @
6c4238f
...
...
@@ -37,28 +37,6 @@
<span>
政策法规推荐
</span>
</div>
<div
id=
"regulation"
>
<li
class=
"zcfg"
>
<div
class=
"zcfg-top"
>
爬山虎国土空间规划信息化解决
</div>
<div
class=
"zcfg-body"
>
10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。
</div>
<div
class=
"zcfg-bottom"
>
2020-10-28
</div>
</li>
<li
class=
"zcfg"
>
<div
class=
"zcfg-top"
>
爬山虎国土空间规划信息化解决
</div>
<div
class=
"zcfg-body"
>
10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势
</div>
<div
class=
"zcfg-bottom"
>
2020-10-28
</div>
</li>
</div>
</ul>
</div>
...
...
Please
register
or
sign in
to post a comment