hongjunluo 2 years ago
parent 5abcb0c848
commit f3a1112cf1
  1. 68
      form/form.html
  2. 22
      news/news01.html
  3. 25
      news/news02.html
  4. 21
      news/news03.html
  5. 21
      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,6 +127,9 @@
// 新闻列表-集团要闻
function news01_render(pageCurrent){
console.log(pageCurrent);
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
@ -145,9 +148,15 @@
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;
@ -162,24 +171,21 @@
})
$('.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>";
}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);
}
}
},
error: function (err) {
console.log(err);
@ -189,6 +195,8 @@
}
}
news01_render(pageCurrent);
</script>

@ -121,9 +121,13 @@
news02_render(pageCurrent);
}
// 新闻列表-企业动态
function news02_render(pageCurrent){
console.log(pageCurrent);
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
@ -142,9 +146,15 @@
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;
@ -161,24 +171,23 @@
})
$('.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);
}
}
},
error: function (err) {
console.log(err);
@ -188,6 +197,8 @@
}
}
news02_render(pageCurrent);
</script>

@ -115,6 +115,9 @@
// 新闻列表-媒体聚集35
function news03_render(pageCurrent){
console.log(pageCurrent);
if (pageCurrent < 1) {
alert('第一页');
}else{
$.ajax({
type: 'post',
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList',
@ -133,9 +136,15 @@
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;
@ -151,22 +160,18 @@
})
$('.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>";
}
}
page += "<li><a href='javascript:void(0)' onclick=news03_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
}
},
@ -178,6 +183,8 @@
}
}
news03_render(pageCurrent);
</script>

@ -153,7 +153,9 @@
// 新闻列表-党建工作
function work_render(pageCurrent){
console.log(pageCurrent);
if (pageCurrent < 1) {
alert('第一页');
} else {
// 获取列表
$.ajax({
type: 'post',
@ -175,6 +177,13 @@
var html = '';
var page = '';
console.log(item);
newsNum = res.data.total;
pageNum = Math.ceil(newsNum/4);
if (pageCurrent > pageNum) {
alert('最后一页');
} else {
// 页面渲染
$('.news_wrap').empty();
$('.pageNum_wrap').empty();
@ -202,22 +211,18 @@
})
$('.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>";
}
}
page += "<li><a href='javascript:void(0)' onclick=work_render(" + pageCurrent + "+1)>></a></li>";
$('.pageNum_wrap').append(page);
}
}
},
@ -229,6 +234,8 @@
}
}
work_render(pageCurrent);
</script>

Loading…
Cancel
Save