c1e2982a by 任超

style:新闻模块

1 parent 2a36cc3a
......@@ -714,106 +714,13 @@ div.navigation {
color: #9B9B9B;
margin-top: 10px;
}
/* -----------------底部start----------------------------- */
div.footer {
background-color: #233042;
width: 100%;
}
div.footer .system_service {
width: 100%;
border-bottom: 1px solid #4A4A4A;
}
div.footer .system_service ul {
padding: 40px 0;
width: 1400px;
margin: 0 auto;
font-size: 0;
}
div.footer .system_service ul li {
width: 20%;
display: inline-block;
text-align: center;
height: 18px;
box-sizing: border-box;
}
div.footer .system_service ul li:not(:last-child) {
border-right: 1px solid #6D7278;
}
div.footer .system_service ul li a {
font-size: 16px;
font-weight: 400;
color: #DEDEDE;
}
div.footer .system_service ul li a:hover {
color: #f46143;
}
.footer .subject {
width: 80%;
margin: 0 auto;
padding: 40px 0;
overflow: hidden;
}
.footer .subject .footer_logo {
float: left;
}
.footer .subject .footer_logo a {
display: block;
width: 64px;
height: 74px;
padding: 10px;
}
.footer .subject .footer_logo a img {
width: 100%;
height: 100%;
}
.footer .subject ul, ol {
float: left;
color: #CBCBCB;
text-align: left;
}
.footer .subject ul {
width: 73%;
box-sizing: border-box;
padding-left: 40px;
margin-top: 10px;
}
.footer .subject ul li {
width: 30%;
display: inline-block;
text-align: left;
margin-bottom: 30px;
}
.footer .subject ol li {
display: inline-block;
text-align: center;
}
.footer .subject ol li:last-child {
margin-left: 60px;
}
.footer .subject ol li img {
width: 80px;
height: 80px;
}
.footer .subject ol li p {
/* 来源 */
.source {
color: #6D7278;
font-size: 12px;
color: #CBCBCB;
margin-top: 5px;
margin-top: 30px;
}
.source p:nth-child(2) {
color: #4A4A4A;
font-size: 14px;
}
\ No newline at end of file
......
$(function () {
let Mydate = new Date()
let year = Mydate.getFullYear();
let minutes = Mydate.getMinutes()
let hour = Mydate.getHours();
let date = Mydate.getDate()
let month = Mydate.getMonth();
$('.date div:first-child').text(year)
$('.date div:nth-child(2)').text(month + 1 + "/" + date)
$('.date div:last-child').text(hour + ":" + minutes)
LawsData()
HotArticle();
PolicyHotArticle();
......@@ -27,9 +18,12 @@ function LawsData() {
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200 && result.data != null) {
console.log(999,result.data)
$('.newsTitle').html(result.data.headline)
newsList.append(result.data.content)
$('.newsTitle').html(result.data.headline);
newsList.append(result.data.content);
$('.source p').eq(1).text(result.data.source);
$('#years').text((result.data.addtime.split(' ')[0]).split('-')[0]);
$('#month').text((result.data.addtime.split(' ')[0]).split('-')[1] + '/' + (result.data.addtime.split(' ')[0]).split('-')[2]);
$('#time').text((result.data.addtime.split(' ')[1]).split('-')[0].split(':')[0] + ':' +(result.data.addtime.split(' ')[1]).split('-')[0].split(':')[1])
}
}
});
......@@ -50,7 +44,9 @@ function HotArticle() {
if (result.code == 200 && result.data != null) {
for (var i = 0; i < result.data.length; i++) {
li = '<li class="tj">';
li += '<img src="' + result.data[i].cover + '">';
if (result.data[i].cover) {
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>';
......
......@@ -29,9 +29,9 @@
<div class="left2">
<div class="left-left">
<div class="date">
<div></div>
<div>10/27</div>
<div>20:53</div>
<div id="years"></div>
<div id="month">10/27</div>
<div id="time">20:53</div>
</div>
<div class="readNum">
<div>
......@@ -41,6 +41,10 @@
<span>1132</span>
</div>
</div>
<div class="source">
<p>信息来源</p>
<p></p>
</div>
<div class="share">
<span>-分享-</span>
<div class="imaglist">
......