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

@ -542,7 +542,8 @@ a:active{
.middleContent .imgcontainer img{
width:100%;
height:100%;
/* height:100%; */
height: 140px
}
.middleContent .contenttitle{
color:#000000;
@ -552,8 +553,8 @@ a:active{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
margin: 30px 0;
}
@ -562,6 +563,17 @@ a:active{
padding:0;
color:#747474;
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{
color:#747474;

@ -233,7 +233,8 @@
<div class="electricItem section3active">
<div class="imgContainer"><img src="images/电子信.png"></div>
<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>
</div>
@ -241,7 +242,7 @@
<div class="electricItem">
<div class="imgContainer"><img src="images/zhuangbei.png"></div>
<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>
</div>
@ -249,7 +250,7 @@
<div class="electricItem">
<div class="imgContainer"><img src="images/生物医药.png"></div>
<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>
</div>
@ -257,7 +258,7 @@
<div class="electricItem">
<div class="imgContainer"><img src="images/先进材料.png"></div>
<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>
</div>
@ -279,48 +280,12 @@
</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="titleContent">
<div class="titleItem titleItemActive">集团要闻</div>
<!-- <div class="titleItem titleItemActive">集团要闻</div>
<div class="titleItem">企业动态</div>
<div class="titleItem">媒体聚焦</div>
<div class="titleItem">媒体聚焦</div> -->
</div>
<div class="middleContent">
<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>
@ -332,7 +297,7 @@
<!-- 上市企业 -->
<div class="conpanyBrand" style="width: 100%!important;">
<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="companyLeftContent">
<h2>上市企业</h2>

@ -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);

@ -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')
}
},

Loading…
Cancel
Save