$(function(){
if($('#BreadcrumbNav').length>0){
commonApi.addcrumbs(channelsTag,'#BreadcrumbNav')
}
commonApi.addChannelLIst(dataObj.jianjie,'.whatis .desc',{
html:'{summary}',
num:1,
fields:['summary']
});
commonApi.addChannelLIst(dataObj.youshi,'.youshi .list',{
html:'
\
\
- \
\
{title}
\
\
- \
{summary}
\
\
\
',
num:30,
fields:['title', 'imgCover', 'summary']
},function(){
$('.youshi .list li').eq(0).addClass('on');
$('.youshi .list li').hover(function(){
$(this).addClass('on').siblings().removeClass('on');
});
});
commonApi.addChannelLIst(dataObj.hyfw,'.hyfw .swiper-wrapper',{
html:'\
\
- \
\
{title}
\
\
- \
{summary}\
\
\
',
num:30,
fields:['title', 'imgCover', 'summary']
},function(){
if(isie9(1)){
var windowWidth = $(window).width(),
preview = 4;
if (windowWidth <= 1200 && windowWidth > 991) {
preview = 3;
} else if (windowWidth <= 991 && windowWidth > 450) {
preview = 2;
} else if (windowWidth < 451) {
preview = 1;
}
var swiperCarousel = new Swiper('.hyfw .swiper-container', {
autoplay:true,
paginationClickable: true,
slidesPerView: preview,
slidesPerGroup: 1,
loop: true,
grabCursor: true,
calculateHeight: true
});
$('.hyfw .swiper-ctrl-prev').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipePrev();
return false;
});
$('.hyfw .swiper-ctrl-next').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipeNext();
return false;
});
}else{
var swiperCarousel = new Swiper('.hyfw .swiper-container', {
observer: true, //开启动态检查器,监测swiper和slide
observeParents: true, //监测Swiper 的祖/父元素
loop: false,
grabCursor: true,
autoplay: false,
pagination: {
el: '.hyfw .swiper-pagination',
clickable: true,
},
navigation: {
prevEl: '.hyfw .swiper-ctrl-prev',
nextEl: '.hyfw .swiper-ctrl-next',
},
slidesPerView: 4,
slidesPerGroup: 1,
breakpoints: {//当屏幕宽度小于等于***
1200: { slidesPerView: 3 },
991: { slidesPerView: 2 },
450: { slidesPerView: 1 },
},
})
}
});
commonApi.addChannelLIst(dataObj.kwptcp,'#data-kwptcp-title',{
html:'{title}',
num:1,
fields:['title']
});
commonApi.addChannelLIst(dataObj.kwptcp,'#data-kwptcp-desc',{
html:'{summary}',
num:1,
fields:['summary']
});
commonApi.addChannelLIst(dataObj.kwptcp,'#data-kwptcp-list',{
html:'\
\
\
{title}\
\
',
startIndex:1,
num:6,
fields:['title', 'imgCover']
});
commonApi.addChannelLIst(dataObj.kwdmxyyglxt,'#data-kwdmxyyglxt-memo',{
html:'\
{title}\
\
\
\
\
\
{summary}\
',
num:1,
fields:['title', 'summary', 'imgCover']
});
commonApi.addChannelLIst(dataObj.kwdmxyyglxt,'#data-kwdmxyyglxt-pic',{
html:'\
\
',
num:1,
fields:['imgCover']
});
commonApi.addChannelLIst(dataObj.kwdmxyyglxt,'#data-kwdmxyyglxt-list',{
html:'\
\
\
\
{title}\
\
',
startIndex:1,
num:5,
fields:['title', 'imgCover', 'imgCover2']
});
commonApi.addChannelLIst(dataObj.kwdmxznyyzt,'#data-kwdmxznyyzt-memo',{
html:'\
{title}\
\
\
\
\
\
{summary}\
',
num:1,
fields:['title', 'summary', 'imgCover']
});
commonApi.addChannelLIst(dataObj.kwdmxznyyzt,'#data-kwdmxznyyzt-pic',{
html:'\
\
',
num:1,
fields:['title', 'imgCover']
});
commonApi.addChannelLIst(dataObj.kwdmxznyyzt,'#data-kwdmxznyyzt-list',{
html:'\
\
\
\
{title}\
\
',
startIndex:1,
num:5,
fields:['title', 'imgCover', 'imgCover2']
});
$(".cando").slide({
titCell: ".hd li",
mainCell: ".bd",
delayTime: 0,
triggerTime: 0
});
$(".intab").slide({
titCell: ".inhd li",
mainCell: ".inbd",
delayTime: 0,
triggerTime: 0,
returnDefault:true
});
//开悟应用产品
if(isie9(1)){
var windowWidth = $(window).width(),
preview = 4;
if (windowWidth <= 1200 && windowWidth > 991) {
preview = 3;
} else if (windowWidth <= 991 && windowWidth > 450) {
preview = 2;
} else if (windowWidth < 451) {
preview = 1;
}
var swiperCarousel = new Swiper('.kwyycp .swiper-container', {
paginationClickable: true,
slidesPerView: preview,
slidesPerGroup: 1,
loop: false,
grabCursor: true,
calculateHeight: true
});
$('.kwyycp .swiper-ctrl-prev').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipePrev();
return false;
});
$('.kwyycp .swiper-ctrl-next').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipeNext();
return false;
});
}else{
var swiperCarousel = new Swiper('.kwyycp .swiper-container', {
observer: true, //开启动态检查器,监测swiper和slide
observeParents: true, //监测Swiper 的祖/父元素
loop: false,
grabCursor: true,
autoplay: false,
spaceBetween: 20,
pagination: {
el: '.kwyycp .swiper-pagination',
clickable: true,
},
navigation: {
prevEl: '.kwyycp .swiper-ctrl-prev',
nextEl: '.kwyycp .swiper-ctrl-next',
},
slidesPerView: 4,
slidesPerGroup: 1,
breakpoints: {//当屏幕宽度小于等于***
1200: { slidesPerView: 3 },
991: { slidesPerView: 2 },
450: { slidesPerView: 1 },
},
})
new Swiper(".kaiwutop .swiper-container", {
spaceBetween: 30,
autoplay: {
delay: 5000,
stopOnLastSlide: false,
disableOnInteraction: true,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
});
}
$('#closeBtn,#closeBtn2').on('click',function(){
$(this).parent().hide();
})
if($(window).width() < 991){
$('#orgnBtn,#orgnBtn2').on('click',function(){
$(this).parents('.tool').siblings('.jg-img').css('display','flex');
})
}else{
$('#orgnBtn,#orgnBtn2').on('click',function(){
$(this).parents('.tool').siblings('.jg-img').show();
})
}
//开悟AI优质作品
commonApi.addChannelLIst(dataObj.kwdmxyzzp,'#data-kwdmxyzzp-list',{
html:'\
\
{title}查看详情\
',
startIndex:0,
num:10,
fields:['title', 'imgCover', 'url']
});
console.log(dataObj.kwdmxdmx);
commonApi.addChannelLIst(dataObj.kwdmxdmx,'.dmxal .swiper-wrapper',{
html:'',
num:6,
fields:['title', 'imgCover', 'summary', 'url']
},function(){
if(isie9(1)){
var windowWidth = $(window).width(),
preview = 3;
if (windowWidth <= 1200 && windowWidth > 991) {
preview = 3;
} else if (windowWidth <= 991 && windowWidth > 450) {
preview = 2;
} else if (windowWidth < 451) {
preview = 1;
}
var swiperCarousel = new Swiper('.dmxal .swiper-container', {
paginationClickable: true,
slidesPerView: preview,
slidesPerGroup: 1,
loop: false,
grabCursor: true,
calculateHeight: true
});
$('.dmxal .swiper-ctrl-prev').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipePrev();
return false;
});
$('.dmxal .swiper-ctrl-next').on('click', function (e) {
e.preventDefault();
swiperCarousel.swipeNext();
return false;
});
}else{
var swiperCarousel = new Swiper('.dmxal .swiper-container', {
observer: true, //开启动态检查器,监测swiper和slide
observeParents: true, //监测Swiper 的祖/父元素
loop: false,
grabCursor: true,
autoplay: false,
spaceBetween: 20,
pagination: {
el: '.dmxal .swiper-pagination',
clickable: true,
},
navigation: {
prevEl: '.dmxal .swiper-ctrl-prev',
nextEl: '.dmxal .swiper-ctrl-next',
},
slidesPerView: 3,
slidesPerGroup: 1,
breakpoints: {//当屏幕宽度小于等于***
1200: { slidesPerView: 3 },
991: { slidesPerView: 2 },
450: { slidesPerView: 1 },
},
})
}
})
});