hongjunluo 2 years ago
parent 9a92d80fd2
commit 439906fa05
  1. 8
      .vscode/sftp.json
  2. 3
      css/style.css
  3. BIN
      images/banner-党建工作@2x.png
  4. 10
      news/detail.html
  5. 4
      news/news01.html
  6. 6
      news/news02.html
  7. 4
      news/news03.html
  8. 39
      work/detail.html
  9. 49
      work/work.html

8
.vscode/sftp.json vendored

@ -3,10 +3,10 @@
"host": "47.100.47.158",
"protocol": "sftp",
"port": 21,
"secure": true,
"username": "suzhou",
"remotePath": "/",
"remotePath": "/",
"password": "WEBY7SHSFdeEECj4",
"uploadOnSave": false,
"useTempFile": false,
"openSsh": false,
"connectTimeout":10000
"connect_timeout": 30
}

@ -48,7 +48,8 @@ a.more_white:hover{color: #fff; background: #fff; text-decoration: none;}
.part .part-img{ width: 60%!important;margin-left: 20%;}
.detail .content .time{ text-align: center;margin-bottom: 30px;}
.detail .content img{ text-align: center;width: 60%;height: auto; margin-left: 20%;}
/* .detail .content .text :not(p){text-align: center;} */
.detail .content img{ text-align: center;width: 60%;height: auto;}
.detail .content p{ font-size: 16px;}
/*分页*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

@ -19,7 +19,9 @@
<script src="../js/common.js"></script>
<script src="../js/bootstrap.js"></script>
<style>
/* :not(p){text-align: center;} */
</style>
</head>
<body>
@ -77,16 +79,14 @@
var title = data.title;
var content = data.content;
var time = data.publish_time_text.substr(0,11);
content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
$('.content img').css({'width':'30%'});
});
html = "<h2>" + title + "</h2>";
html += "<p class='time'>日期:" + time + "</p>";
html += '<div class="text">' + content + '</div>';
$('.content').append(html);
$('img').parents('p').css({'text-align':'center'});
}
},
error: function (err) {

@ -121,8 +121,8 @@
data:{
category_id:11,
page:pageCurrent,
order:'asc',
sort:'weigh'
order:'desc',
sort:'publish_time'
},
dataType: 'json',

@ -118,8 +118,8 @@
data:{
category_id:13,
page:pageCurrent,
order:'asc',
sort:'weigh'
order:'desc',
sort:'publish_time'
},
dataType: 'json',
@ -140,7 +140,7 @@
var id = item[index].id;
html += "<li class='list'>";
html += "<div class='time'><span><strong>" + time.substr(0,4) + "</strong><br><b>" + time.substr(6,11) + "</b></span></div>";
html += "<div class='time'><span><strong>" + time.substr(0,4) + "</strong><br><b>" + time.substr(5,10) + "</b></span></div>";
html += "<div class='text'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><p>" + subtitle + "</p>";
html += "<a href='detail.html?id=" + id + "' target='_blank'>了解更多&nbsp;></a>";
html += "</div>";

@ -109,8 +109,8 @@
data:{
category_id:35,
page:pageCurrent,
order:'asc',
sort:'weigh'
order:'desc',
sort:'publish_time'
},
dataType: 'json',

@ -12,6 +12,7 @@
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/bxslider.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
<link rel="stylesheet" href="../css/work.css">
<!--导航样式-->
<link rel="stylesheet" href="../css/head.css" />
<script src="../js/jquery.min.js"></script>
@ -19,7 +20,7 @@
<script src="../js/common.js"></script>
<script src="../js/bootstrap.js"></script>
<style>
img{width: 60%!important;}
/* :not(p){text-align: center;} */
</style>
</head>
@ -28,19 +29,14 @@
<div id="header"></div>
<!-- part0 -->
<div class="page_bg top_box" style="background: url(../images/banner-党建工作@2x.png) center top no-repeat;">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 number_text" data-move-y="140px">
<p class="line_1">党建工作</p>
<p class="line_2">PARTY BUILDING</p>
</div>
</div>
</div>
<div class="section topcontent">
<img src="../images/banner-党建工作@2x.png" alt="">
<div class="titleContent">
<div class="title">党建工作</div>
<div class="subtitle">PARTY BUILDING</div>
</div>
</div>
<!-- part1 -->
<div class="detail work_detail">
<div class="container">
@ -90,14 +86,17 @@
var content = data.content;
var time = data.publish_time_text.substr(0,11);
content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
$('.content img').css({'width':'30%'});
});
html = "<h2>" + title + "</h2>";
html += "<p class='time'>日期:" + time + "</p>";
html += '<div class="text">' + content + '</div>';
$('.content').append(html);
// content.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {
// console.log($('.content:not(p)')).css({'text-align':'center'});
// });
html = "<h2>" + title + "</h2>";
html += "<p class='time'>日期:" + time + "</p>";
html += '<div class="text">' + content + '</div>';
$('.content').append(html);
$('img').parents('p').css({'text-align':'center'});
}
},

@ -105,7 +105,7 @@
<script type="text/javascript">
let pageCurrent = 1;
var pageCurrent = 1;
// 新闻列表-党建工作-推荐
function rec_render(){
$.ajax({
@ -118,8 +118,8 @@
success: function (res) {
if(res.code==200){
let data = res.data;
let html = '';
var data = res.data;
var html = '';
$('.leftcontent').empty();
var title = data.title;
@ -149,10 +149,11 @@
rec_render();
// 新闻列表-党建工作
function work_render(pageCurrent){
console.log(pageCurrent);
// 获取列表
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
@ -160,20 +161,22 @@
category_id:37,
page:pageCurrent,
limit:4,
order:'asc',
sort:'weigh'
order:'desc',
sort:'flags',
// flags:'desc'
},
dataType: 'json',
// async:false,
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
var item = res.data.data;
var html = '';
var page = '';
console.log(item);
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
@ -181,20 +184,20 @@
var thumb = item[index].thumb;
var id = item[index].id;
var flags = item[index].flags;
if (flags == 'top') {
html += "<div class='items'>";
html += "<div class='left'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='right'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><div class='time'>" + time + "</div><p>"+ subtitle + "</p></div>";
html += "<div class='zhiding'>置顶</div>";
html += "</div>";
if (flags) {
html += "<div class='items'>";
html += "<div class='left'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='right'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><div class='time'>" + time + "</div><p>"+ subtitle + "</p></div>";
html += "<div class='zhiding'>置顶</div>";
html += "</div>";
} else {
html += "<div class='items'>";
html += "<div class='left'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='right'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><div class='time'>" + time + "</div><p>"+ subtitle + "</p></div>";
html += "</div>";
}
html += "<div class='left'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='right'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><div class='time'>" + time + "</div><p>"+ subtitle + "</p></div>";
html += "</div>";
}
})
$('.news_wrap').append(html);
@ -203,7 +206,7 @@
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
for (var index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=work_render(" + index + ")>" + index + "</a></li>";
}else{

Loading…
Cancel
Save