hongjunluo 2 years ago
parent 5abcb0c848
commit f3a1112cf1
  1. 68
      form/form.html
  2. 122
      news/news01.html
  3. 127
      news/news02.html
  4. 125
      news/news03.html
  5. 143
      work/work.html

@ -53,17 +53,17 @@
<div class="col-xs-12 col-sm-12 col-md-12 wrap">
<!-- form -->
<form id="myform" name="myform" class="form-horizontal wow fadeInDown" method="post" action="#" onSubmit="return CheckJob()">
<form id="myform" name="myform" class="form-horizontal wow fadeInDown" method="post" action="#" onSubmit="return checkContent()">
<div class="form-group">
<label for="title"class="col-sm-3 control-label left">融资公司:</label>
<div class="col-sm-6">
<input type="text" name="FaqTitle" class="form-control right" id="title" placeholder="必填">
<input type="text" name="company" class="form-control right" id="company" placeholder="必填">
</div>
</div>
<div class="form-group">
<label for="username" class="col-sm-3 control-label left">地址:</label>
<div class="col-sm-6">
<input type="text" name="Contact" class="form-control right" id="username" placeholder="必填">
<input type="text" name="address" class="form-control right" id="address" placeholder="必填">
</div>
</div>
<div class="form-group">
@ -114,7 +114,7 @@
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-12 sub">
<button type="submit" name="button" value="提交申请" class="btn btn-danger page-btn">提交申请</button>
<button type="submit" name="button" value="提交申请" id="submit" class="btn btn-danger page-btn">提交申请</button>
</div>
</div>
<input type="hidden" name="__hash__" value="6e5d808c69f637c3f9c153adb451cd4e_684a5f077a400f78010938d2f396b164" />
@ -170,4 +170,64 @@ function CheckJob()
}
$('body').on('click','#submit',function(){
var company = $('#company').val();
var product = $('#product').val();
var num = $('#number').val();
var name = $('#username').val();
var address = $('#address').val();
var phone = $('#phone').val();
var fax = $('#fax').val();
var email = $('#email').val();
var detail = $('#detail').val();
$.ajax({
type: 'post',
dataType: 'text',
// dataType: 'json',
url: 'https://suzhou.njrenzhou.cn/api.php/apply/apply',
data: {
'product': product,
'num': num,
'name': name,
'company': company,
'address': address,
'phone': phone,
'fax': fax,
'email': email,
'detail': detail
},
beforeSend:function(){
if (!product) {
alert('内容不能为空');
return false;
}
else if (name == '') {
alert('姓名不能为空');
return false;
}
else if (phone == '') {
alert('手机号码不能为空');
return false;
}
else if(!phone.match(/^1(3|4|5|8)\d{1}[-]?\d{4}[-]?\d{4}$/)){
alert('手机号码格式错误');
return false;
}
else return true;
},
success:function(data){
console.log(data);
if (data.msg = 'success') {
alert('提交成功');
window.location.reload();
}else{
alert('提交失败');
}
},
error:function(){
alert('error');
}
})
})
</SCRIPT>

@ -127,65 +127,73 @@
// 新闻列表-集团要闻
function news01_render(pageCurrent){
console.log(pageCurrent);
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:11,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
html += "<div class='thumb'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='text'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><p>" + time + "</p>";
html += "<p>" + subtitle + "</p></div></li>";
})
$('.news_wrap').append(html);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news01_render(" + index + ")>" + index + "</a></li>";
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:11,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
if(pageCurrent > pageNum){
alert('最后一页');
}else{
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + index + ")>" + index + "</a></li>";
// 内容渲染
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
html += "<div class='thumb'><img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
html += "<div class='text'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><p>" + time + "</p>";
html += "<p>" + subtitle + "</p></div></li>";
})
$('.news_wrap').append(html);
// 页码渲染
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news01_render(" + index + ")>" + index + "</a></li>";
}else{
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + index + ")>" + index + "</a></li>";
}
}
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
}
page += "<li><a href='javascript:void(0)' onclick=news01_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
},
error: function (err) {
console.log(err);
}
});
}
},
error: function (err) {
console.log(err);
}
});
}
}

@ -121,71 +121,82 @@
news02_render(pageCurrent);
}
// 新闻列表-企业动态
function news02_render(pageCurrent){
console.log(pageCurrent);
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:13,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:13,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
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>";
})
$('.news_wrap').append(html);
if (pageCurrent > pageNum) {
alert('最后一页');
}else{
// 内容渲染
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
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>";
})
$('.news_wrap').append(html);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
// 页码渲染
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news02_render(" + index + ")>" + index + "</a></li>";
}else{
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + index + ")>" + index + "</a></li>";
}
}
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news02_render(" + index + ")>" + index + "</a></li>";
}else{
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + index + ")>" + index + "</a></li>";
}
}
page += "<li><a href='javascript:void(0)' onclick=news02_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
},
error: function (err) {
console.log(err);
}
});
}
},
error: function (err) {
console.log(err);
}
});
}
}
news02_render(pageCurrent);

@ -115,66 +115,73 @@
// 新闻列表-媒体聚集35
function news03_render(pageCurrent){
console.log(pageCurrent);
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:35,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
html += "<img src=https://suzhou.njrenzhou.cn" + thumb + ">";
html += "<div class='text'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><br><p>" + time + "</p>";
html += "</div></li>";
})
$('.news_wrap').append(html);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news03_render(" + index + ")>" + index + "</a></li>";
}else{
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + index + ")>" + index + "</a></li>";
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:35,
page:pageCurrent,
order:'desc',
sort:'publish_time',
search:searchContent
},
dataType: 'json',
success: function (res) {
if(res.code==200){
let item = res.data.data;
let html = '';
let page = '';
console.log(item);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/10);
if (pageCurrent > pageNum) {
alert('最后一页');
} else {
// 内容渲染
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
html += "<li class='list'>";
html += "<img src=https://suzhou.njrenzhou.cn" + thumb + ">";
html += "<div class='text'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><br><p>" + time + "</p>";
html += "</div></li>";
})
$('.news_wrap').append(html);
// 页码渲染
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + pageCurrent + "-1)><</a></li>";
for (let index = 1; index <= pageNum; index++) {
if (index == pageCurrent) {
page += "<li class='active'><a href='javascript:void(0)' onclick=news03_render(" + index + ")>" + index + "</a></li>";
}else{
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + index + ")>" + index + "</a></li>";
}
}
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
}
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
},
error: function (err) {
console.log(err);
}
});
}
},
error: function (err) {
console.log(err);
}
});
}
}

@ -153,79 +153,86 @@
// 新闻列表-党建工作
function work_render(pageCurrent){
console.log(pageCurrent);
// 获取列表
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:37,
page:pageCurrent,
limit:4,
order:'desc',
sort:'flags',
// flags:'desc'
},
dataType: 'json',
// async:false,
success: function (res) {
if(res.code==200){
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;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
var flags = item[index].flags;
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>";
if (pageCurrent < 1) {
alert('第一页');
} else {
// 获取列表
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
data:{
category_id:37,
page:pageCurrent,
limit:4,
order:'desc',
sort:'flags',
// flags:'desc'
},
dataType: 'json',
// async:false,
success: function (res) {
if(res.code==200){
var item = res.data.data;
var html = '';
var page = '';
console.log(item);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/4);
if (pageCurrent > pageNum) {
alert('最后一页');
} else {
html += "<div class='items'>";
// 页面渲染
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
$.each(item,function(index){
var title = item[index].title;
var subtitle = item[index].subtitle;
var time = item[index].publish_time_text.substr(0,11);
var thumb = item[index].thumb;
var id = item[index].id;
var flags = item[index].flags;
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>";
}
})
$('.news_wrap').append(html);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/4);
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "-1)><</a></li>";
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{
page += "<li><a href='javascript:void(0)' onclick=work_render(" + index + ")>" + index + "</a></li>";
} 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>";
}
})
$('.news_wrap').append(html);
// 页码渲染
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "-1)><</a></li>";
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{
page += "<li><a href='javascript:void(0)' onclick=work_render(" + index + ")>" + index + "</a></li>";
}
}
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
}
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
},
error: function (err) {
console.log(err);
}
});
}
},
error: function (err) {
console.log(err);
}
});
}
}

Loading…
Cancel
Save