上市企业
diff --git a/js/index.js b/js/index.js
index 982dd69..f306ddc 100644
--- a/js/index.js
+++ b/js/index.js
@@ -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:['
','
'],
+ // 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:['
','
'],
- 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,86 +273,104 @@ $(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+=`
- // 党建工作
- // `
- // }
- // html+=`
- // ${item.title}
- //
- // `
- // })
- // }
+ success: function (res) {
+ let html = ''
+ let data = res.data
+ data.forEach((item,index)=>{
+ if(index==0){
+ html+=`
${item.title}
`
+ news01_render(item.id)
+ }else{
+ html+=`
${item.title}
`
+ }
+ })
+ $(".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);
- }
+ 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 += "
";
- // html += "
";
- // html += "
";
- // html += "
" + title + "" + time + "
";
- // html += "
" + subtitle + "
";
- })
- $('.news_wrap').append(html);
-
- }
+ if(res.code==200){
+ let html = ''
+ let data = res.data.data;
+ data.forEach((item,index)=>{
+ html+=`
+
+
+
+
+
${item.title}
+
${item.subtitle}
+
${item.publish_time_text}
+
+
`
+ })
+ $('.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:['
','
'],
+ nav:false,
+ dots:false,
+ responsive:{
+ 0:{
+ items:1
+ },
+ 576:{
+ items:2
+ },
+ 767:{
+ items:3
+ },
+ },
+ })
+ }
},
error: function (err) {
console.log(err);
}
});
-
+
}
-news01_render(pageCurrent);
diff --git a/js/service12.js b/js/service12.js
index 495d0ad..51bb041 100644
--- a/js/service12.js
+++ b/js/service12.js
@@ -2,10 +2,11 @@
//banner
$(function(){
let url = window.location.href;
-
if(url.split('?').length!=0&&url.split('?')[1]){
- $(`.section${url.split('?')[1].slice(3)}`).addClass('active')
+ $(`.section${url.split('?')[1].slice(3)}`).addClass('active');
+ console.log(url.split('?')[1].slice(3))
// $('header').css('display','none !important')
+ $("#header").css('display','none')
}
$('#header').load('../public/header1.html',function(){
@@ -42,12 +43,13 @@
// anchors: ['hero', 'one', 'two', 'three','four','five'],
loopHorizontal: true,
afterLoad: function(anchorLink, index){
- console.log(index)
- $('header').addClass('on').addClass("animation");
+
if(index==1){
+ $("#header").css('display','block');
$('header').css('display','flex');
-
+ $('header').addClass('on').addClass("animation");
}else{
+ // $("#header").css('display','none');
$('header').css('display','none')
}
},