|
|
|
@ -41,7 +41,28 @@ $(function(){ |
|
|
|
|
var w = $(window); |
|
|
|
|
return !(w.scrollTop() > (of.top + o.outerHeight()) || (w.scrollTop() + w.height()) < of.top); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// $('.brand__slider').owlCarousel({
|
|
|
|
|
// loop:true,
|
|
|
|
|
// margin:30,
|
|
|
|
|
// autoplay:false,
|
|
|
|
|
// autoplayTimeout:3000,
|
|
|
|
|
// smartSpeed:500,
|
|
|
|
|
// items:3,
|
|
|
|
|
// navText:['<button><i class="fal fa-angle-left"></i></button>','<button><i class="fal fa-angle-right"></i></button>'],
|
|
|
|
|
// nav:false,
|
|
|
|
|
// dots:false,
|
|
|
|
|
// responsive:{
|
|
|
|
|
// 0:{
|
|
|
|
|
// items:1
|
|
|
|
|
// },
|
|
|
|
|
// 576:{
|
|
|
|
|
// items:2
|
|
|
|
|
// },
|
|
|
|
|
// 767:{
|
|
|
|
|
// items:3
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
// })
|
|
|
|
|
$('.index_banner').slick({ |
|
|
|
|
autoplay: true,
|
|
|
|
|
arrows: false, |
|
|
|
@ -60,29 +81,6 @@ $(function(){ |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
$('.brand__slider').owlCarousel({ |
|
|
|
|
loop:true, |
|
|
|
|
margin:30, |
|
|
|
|
autoplay:false, |
|
|
|
|
autoplayTimeout:3000, |
|
|
|
|
smartSpeed:500, |
|
|
|
|
items:3, |
|
|
|
|
navText:['<button><i class="fal fa-angle-left"></i></button>','<button><i class="fal fa-angle-right"></i></button>'], |
|
|
|
|
nav:false, |
|
|
|
|
dots:false, |
|
|
|
|
responsive:{ |
|
|
|
|
0:{ |
|
|
|
|
items:1 |
|
|
|
|
}, |
|
|
|
|
576:{ |
|
|
|
|
items:2 |
|
|
|
|
}, |
|
|
|
|
767:{ |
|
|
|
|
items:3 |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// $($('.electricItem>button')[0]).css('display','block')
|
|
|
|
|
// $($('.electricItem>.addIon')[0]).css('display','none')
|
|
|
|
|
// $($('.electricItem')[0]).css('background','rgba(19,75,161,0.8)')
|
|
|
|
@ -137,18 +135,6 @@ $(function(){ |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
$('.titleContent .titleItem').click(function(){ |
|
|
|
|
$(this).addClass('titleItemActive').siblings().removeClass('titleItemActive'); |
|
|
|
|
if($('.titleItemActive')[0].innerHTML=='企业动态'){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news02.html') |
|
|
|
|
} |
|
|
|
|
if($('.titleItemActive')[0].innerHTML=='集团要闻'){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news01.html') |
|
|
|
|
} |
|
|
|
|
if($('.titleItemActive')[0].innerHTML=='媒体聚焦'){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news03.html') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
$('.index_banner').init(function(slick){ |
|
|
|
|
$('.index_banner .item.slick-current').addClass('active').siblings().removeClass('active') |
|
|
|
|
}) |
|
|
|
@ -228,7 +214,6 @@ $(function(){ |
|
|
|
|
continuousHorizontal:true, |
|
|
|
|
scrollingSpeed:500, |
|
|
|
|
showActiveTooltip :true,
|
|
|
|
|
anchors: ['hero', 'one', 'two', 'three','four','five'], |
|
|
|
|
loopHorizontal: true, |
|
|
|
|
afterLoad: function(anchorLink, index){ |
|
|
|
|
console.log(index) |
|
|
|
@ -269,14 +254,6 @@ $(function(){ |
|
|
|
|
if(index == 6){ |
|
|
|
|
$('header').addClass('on').addClass("animation"); |
|
|
|
|
} |
|
|
|
|
// var wow = new WOW({
|
|
|
|
|
// boxClass: 'wow',
|
|
|
|
|
// animateClass: 'animated',
|
|
|
|
|
// offset: 0,
|
|
|
|
|
// mobile: true,
|
|
|
|
|
// live: true
|
|
|
|
|
// });
|
|
|
|
|
// wow.init();
|
|
|
|
|
}, |
|
|
|
|
afterSlideLoad:function(){ |
|
|
|
|
}, |
|
|
|
@ -296,78 +273,97 @@ $(function(){ |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
$.ajax({ |
|
|
|
|
url: "https://suzhou.njrenzhou.cn/api.php/index/menuList",
|
|
|
|
|
url: "https://suzhou.njrenzhou.cn/api.php/index/cateGory",
|
|
|
|
|
type: "POST", |
|
|
|
|
data: {}, |
|
|
|
|
success: function (res) { |
|
|
|
|
console.log(res,"999");
|
|
|
|
|
// if(res.code==200){
|
|
|
|
|
// let data = res.data;
|
|
|
|
|
// let html = ''
|
|
|
|
|
// data.forEach(item=>{
|
|
|
|
|
// if(item.children&&item.children.length==0){
|
|
|
|
|
// html+=`<li>
|
|
|
|
|
// <a href="javascript:void(0)">党建工作</a>
|
|
|
|
|
// </li>`
|
|
|
|
|
// }
|
|
|
|
|
// html+=`<li class="dropdown">
|
|
|
|
|
// <a href="javascript:void(0)">${item.title}</a>
|
|
|
|
|
// <div class="dropdown_menu">
|
|
|
|
|
// <a href="#">集团介绍</a>
|
|
|
|
|
// <a href="#">董事长致辞</a>
|
|
|
|
|
// <a href="#">核心能力</a>
|
|
|
|
|
// <a href="#">企业文化</a>
|
|
|
|
|
// <a href="#">组织构架</a>
|
|
|
|
|
// <a href="#">合作伙伴</a>
|
|
|
|
|
// <a href="#">联系我们</a>
|
|
|
|
|
// </div>
|
|
|
|
|
// </li>`
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
let html = '' |
|
|
|
|
let data = res.data |
|
|
|
|
data.forEach((item,index)=>{ |
|
|
|
|
if(index==0){ |
|
|
|
|
html+=`<div class="titleItem titleItemActive" data-id='${item.id}'>${item.title}</div>` |
|
|
|
|
news01_render(item.id) |
|
|
|
|
}else{ |
|
|
|
|
html+=`<div class="titleItem" data-id='${item.id}'>${item.title}</div>` |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
$(".titleContent").append(html) |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news01.html') |
|
|
|
|
|
|
|
|
|
$('.titleContent .titleItem').click(function(){ |
|
|
|
|
console.log($(this)) |
|
|
|
|
if($(this).attr('class').indexOf('titleItemActive')!=-1){ |
|
|
|
|
// news01_render($(this)[0].dataset.id)
|
|
|
|
|
}else{ |
|
|
|
|
$(this).addClass('titleItemActive').siblings().removeClass('titleItemActive'); |
|
|
|
|
news01_render($(this)[0].dataset.id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if($('.titleItemActive')[0].dataset.id==11){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news01.html') |
|
|
|
|
} |
|
|
|
|
if($('.titleItemActive')[0].dataset.id==13){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news02.html') |
|
|
|
|
} |
|
|
|
|
if($('.titleItemActive')[0].dataset.id==35){ |
|
|
|
|
$('.newsLeftContent>a').attr('href','http://sct.njrenzhou.cn/news/news03.html') |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
error: function (err) {
|
|
|
|
|
console.log(err);
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
let pageCurrent = 1; |
|
|
|
|
// 新闻列表-集团要闻
|
|
|
|
|
function news01_render(pageCurrent){ |
|
|
|
|
console.log(pageCurrent); |
|
|
|
|
}) |
|
|
|
|
function news01_render(categoryId){ |
|
|
|
|
$.ajax({ |
|
|
|
|
type: 'post', |
|
|
|
|
url: 'https://suzhou.njrenzhou.cn/api.php/news/articleList', |
|
|
|
|
url: 'https://suzhou.njrenzhou.cn/api.php/index/articleList', |
|
|
|
|
data:{ |
|
|
|
|
category_id:11, |
|
|
|
|
page:pageCurrent |
|
|
|
|
category_id:categoryId, |
|
|
|
|
}, |
|
|
|
|
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 += "<div class='brand__thumb category__item transition-3'>";
|
|
|
|
|
// html += "<div class='imgcontainer transition-3'>";
|
|
|
|
|
// html += "<img src=https://suzhou.njrenzhou.cn" + thumb + "></div>";
|
|
|
|
|
// html += "<div class='contentText transition-3'><a href='detail.html?id=" + id + "' target='_blank'>" + title + "</a><p>" + time + "</p>";
|
|
|
|
|
// html += "<p>" + subtitle + "</p></div></li>";
|
|
|
|
|
let html = '' |
|
|
|
|
let data = res.data.data; |
|
|
|
|
data.forEach((item,index)=>{ |
|
|
|
|
html+=`<div class="brand__thumb category__item transition-3">
|
|
|
|
|
<div class="imgcontainer transition-3"> |
|
|
|
|
<img src="https://suzhou.njrenzhou.cn${item.thumb}" alt=""> |
|
|
|
|
</div> |
|
|
|
|
<div class="contentText transition-3"> |
|
|
|
|
<div class="contenttitle">${item.title}</div> |
|
|
|
|
<p>${item.subtitle}</p> |
|
|
|
|
<div class="time">${item.publish_time_text}</div> |
|
|
|
|
</div> |
|
|
|
|
</div>` |
|
|
|
|
}) |
|
|
|
|
$('.brand__slider').empty().append(html) |
|
|
|
|
$(".brand__slider").trigger("destroy.owl.carousel") |
|
|
|
|
$('.brand__slider').owlCarousel({ |
|
|
|
|
loop:true, |
|
|
|
|
margin:30, |
|
|
|
|
autoplay:false, |
|
|
|
|
autoplayTimeout:3000, |
|
|
|
|
smartSpeed:500, |
|
|
|
|
items:3, |
|
|
|
|
navText:['<button><i class="fal fa-angle-left"></i></button>','<button><i class="fal fa-angle-right"></i></button>'], |
|
|
|
|
nav:false, |
|
|
|
|
dots:false, |
|
|
|
|
responsive:{ |
|
|
|
|
0:{ |
|
|
|
|
items:1 |
|
|
|
|
}, |
|
|
|
|
576:{ |
|
|
|
|
items:2 |
|
|
|
|
}, |
|
|
|
|
767:{ |
|
|
|
|
items:3 |
|
|
|
|
}, |
|
|
|
|
},
|
|
|
|
|
}) |
|
|
|
|
$('.news_wrap').append(html); |
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, |
|
|
|
|
error: function (err) {
|
|
|
|
@ -378,4 +374,3 @@ function news01_render(pageCurrent){ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
news01_render(pageCurrent); |
|
|
|
|