5f9f0971 by 任超

style:新闻动态

1 parent cc07ad7f
......@@ -238,7 +238,9 @@ div.subject {
}
.tj img, .tj span {
float: left;
width: 100%;
display: block;
margin-top: 5px;
}
.tj-title {
......@@ -273,7 +275,7 @@ div.subject {
}
.zcfg {
margin-top: 20px;
margin-top: 15px;
display: inline-block;
cursor: pointer;
}
......@@ -288,7 +290,7 @@ div.subject {
font-size: 14px;
font-weight: bold;
color: #686666;
line-height: 14px;
line-height: 20px;
}
.zcfg-body {
......@@ -298,14 +300,17 @@ div.subject {
font-weight: 400;
color: #6D7278;
line-height: 23px;
margin: 10px 0;
margin-top: 25px;
}
.zcfg-bottom {
width: 90px;
height: 12px;
width: 100%;
font-size: 12px;
font-weight: 400;
color: #9B9B9B;
line-height: 12px;
line-height: 16px;
margin-top: 3px;
}
#regulation {
line-height: 0;
}
\ No newline at end of file
......
......@@ -9,6 +9,7 @@ $(function () {
});
LoadNewsData();
HotArticle();
PolicyHotArticle();
addTabs('#news');
});
//加载新闻列表数据
......@@ -65,6 +66,33 @@ function HotArticle() {
}
})
}
// 政策法规推荐
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) {
console.log(result.data)
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 += '<div class="zcfg-bottom">'+result.data[i].deadtime+'</div>'
li += '</li>'
regulation.append(li);
}
}
}
})
}
layui.use('laypage', function () {
let laypage = layui.laypage;
......
......@@ -31,53 +31,35 @@
<h2>新闻推荐</h2>
</div>
<ul class="right-body" id="news_recommendation">
<!-- <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> -->
</ul>
<ul class="right-bottom">
<div class="right-bottom-top">
<span>政策法规推荐</span>
</div>
<li class="zcfg">
<div class="zcfg-top">
<span>爬山虎国土空间规划信息化解决</span>
</div>
<div class="zcfg-body">
<span>10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。</span>
</div>
<div class="zcfg-bottom">
<span>2020-10-28</span>
</div>
</li>
<li class="zcfg">
<div class="zcfg-top">
<span>爬山虎国土空间规划信息化解决</span>
</div>
<div class="zcfg-body">
<span>10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。</span>
</div>
<div class="zcfg-bottom">
<span>2020-10-28</span>
</div>
</li>
<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>
</div>
......