main
liudan 2 years ago
parent 55a09f7610
commit ff3e980fed
  1. 18
      css/index.css
  2. 51
      index.html
  3. 213
      js/index.js
  4. 12
      js/service12.js

@ -542,7 +542,8 @@ a:active{
.middleContent .imgcontainer img{ .middleContent .imgcontainer img{
width:100%; width:100%;
height:100%; /* height:100%; */
height: 140px
} }
.middleContent .contenttitle{ .middleContent .contenttitle{
color:#000000; color:#000000;
@ -552,8 +553,8 @@ a:active{
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 1;
line-clamp: 2; line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin: 30px 0; margin: 30px 0;
} }
@ -562,6 +563,17 @@ a:active{
padding:0; padding:0;
color:#747474; color:#747474;
margin-bottom:30px; margin-bottom:30px;
display: -webkit-box;
display: -moz-box;
white-space: pre-wrap;
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
height: 100px;
margin-right: 10px;
overflow: hidden;
} }
.contentText .time{ .contentText .time{
color:#747474; color:#747474;

@ -233,7 +233,8 @@
<div class="electricItem section3active"> <div class="electricItem section3active">
<div class="imgContainer"><img src="images/电子信.png"></div> <div class="imgContainer"><img src="images/电子信.png"></div>
<p class="text">电子信息</p> <p class="text">电子信息</p>
<button><a href="http://sct.njrenzhou.cn/service/service12.html?id=1">探索更多</a></button> <!-- http://sct.njrenzhou.cn/service/service12.html?id=1 -->
<button><a href="/service/service12.html?id=1">探索更多</a></button>
<div class="addIon">+</div> <div class="addIon">+</div>
</div> </div>
</div> </div>
@ -241,7 +242,7 @@
<div class="electricItem"> <div class="electricItem">
<div class="imgContainer"><img src="images/zhuangbei.png"></div> <div class="imgContainer"><img src="images/zhuangbei.png"></div>
<p class="text">装备制造</p> <p class="text">装备制造</p>
<button><a href="http://sct.njrenzhou.cn/service/service12.html?id=2">探索更多</a></button> <button><a href="/service/service12.html?id=2">探索更多</a></button>
<div class="addIon">+</div> <div class="addIon">+</div>
</div> </div>
</div> </div>
@ -249,7 +250,7 @@
<div class="electricItem"> <div class="electricItem">
<div class="imgContainer"><img src="images/生物医药.png"></div> <div class="imgContainer"><img src="images/生物医药.png"></div>
<p class="text">医药生物</p> <p class="text">医药生物</p>
<button><a href="http://sct.njrenzhou.cn/service/service12.html?id=3">探索更多</a></button> <button><a href="/service/service12.html?id=3">探索更多</a></button>
<div class="addIon">+</div> <div class="addIon">+</div>
</div> </div>
</div> </div>
@ -257,7 +258,7 @@
<div class="electricItem"> <div class="electricItem">
<div class="imgContainer"><img src="images/先进材料.png"></div> <div class="imgContainer"><img src="images/先进材料.png"></div>
<p class="text">先进材料</p> <p class="text">先进材料</p>
<button><a href="http://sct.njrenzhou.cn/service/service12.html?id=4">探索更多</a></button> <button><a href="/service/service12.html?id=4">探索更多</a></button>
<div class="addIon">+</div> <div class="addIon">+</div>
</div> </div>
</div> </div>
@ -279,48 +280,12 @@
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-9 col-xl-9 col-xxl-9 news_middle_container"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-9 col-xl-9 col-xxl-9 news_middle_container">
<div class="titleContent"> <div class="titleContent">
<div class="titleItem titleItemActive">集团要闻</div> <!-- <div class="titleItem titleItemActive">集团要闻</div>
<div class="titleItem">企业动态</div> <div class="titleItem">企业动态</div>
<div class="titleItem">媒体聚焦</div> <div class="titleItem">媒体聚焦</div> -->
</div> </div>
<div class="middleContent"> <div class="middleContent">
<div class="row brand__slider owl-carousel"> <div class="row brand__slider owl-carousel">
<div class="brand__thumb category__item transition-3">
<div class="imgcontainer transition-3">
<img src="images/电子信息-bg.jpg" alt="">
</div>
<div class="contentText transition-3">
<div class="contenttitle">加强党规党纪培训 推动党史学习教育-简阳工投党支部开展党规党纪专项活动</div>
<p>为进一步增强公司全体党员干部增强党纪法规意识,树牢对法律的敬畏之心,结合当前正在深入开展的</p>
<div class="time">2021-4-26</div>
</div>
</div>
<div class="brand__thumb category__item transition-3">
<!-- <div class="business-effect">
<div class="e-img-l"><img alt="" src="./images/section4-hover01.png"></div>
<div class="e-img-r"><img alt="" src="./images/section4-hover02.png"></div>
</div> -->
<div class="imgcontainer transition-3">
<img src="images/电子信息-bg.jpg" alt="">
</div>
<div class="contentText transition-3">
<div class="contenttitle">加强党规党纪培训 推动党史学习教育-简阳工投党支部开展党规党纪专项活动</div>
<p>为进一步增强公司全体党员干部增强党纪法规意识,树牢对法律的敬畏之心,结合当前正在深入开展的</p>
<div class="time">2021-4-26</div>
</div>
<!-- <a href="#">查看详情</a> -->
</div>
<div class="brand__thumb category__item transition-3">
<div class="imgcontainer transition-3">
<img src="images/电子信息-bg.jpg" alt="">
</div>
<div class="contentText transition-3">
<div class="contenttitle">加强党规党纪培训 推动党史学习教育-简阳工投党支部开展党规党纪专项活动</div>
<p>为进一步增强公司全体党员干部增强党纪法规意识,树牢对法律的敬畏之心,结合当前正在深入开展的</p>
<div class="time">2021-4-26</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -332,7 +297,7 @@
<!-- 上市企业 --> <!-- 上市企业 -->
<div class="conpanyBrand" style="width: 100%!important;"> <div class="conpanyBrand" style="width: 100%!important;">
<div class="container"> <div class="container">
<div class="row"> <div class="row news_Container">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-3 col-xl-3 col-xxl-3 sliderContainer1"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-3 col-xl-3 col-xxl-3 sliderContainer1">
<div class="companyLeftContent"> <div class="companyLeftContent">
<h2>上市企业</h2> <h2>上市企业</h2>

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

@ -2,10 +2,11 @@
//banner //banner
$(function(){ $(function(){
let url = window.location.href; let url = window.location.href;
if(url.split('?').length!=0&&url.split('?')[1]){ 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 !important')
$("#header").css('display','none')
} }
$('#header').load('../public/header1.html',function(){ $('#header').load('../public/header1.html',function(){
@ -42,12 +43,13 @@
// anchors: ['hero', 'one', 'two', 'three','four','five'], // anchors: ['hero', 'one', 'two', 'three','four','five'],
loopHorizontal: true, loopHorizontal: true,
afterLoad: function(anchorLink, index){ afterLoad: function(anchorLink, index){
console.log(index)
$('header').addClass('on').addClass("animation");
if(index==1){ if(index==1){
$("#header").css('display','block');
$('header').css('display','flex'); $('header').css('display','flex');
$('header').addClass('on').addClass("animation");
}else{ }else{
// $("#header").css('display','none');
$('header').css('display','none') $('header').css('display','none')
} }
}, },

Loading…
Cancel
Save