").addclass("cn_relist");
$(".saf-relist > .p_item").append(sub);
$.get(href, function(r) {
$(r).filter(".main").find(".cnreinfo .p_list").children().appendto(sub);
});
})($(this));
});
$(".saf-search a").click(function(){
if($(".saf-search input").val() == ""){
$(".saf-search").addclass("is-invalid");
$(".saf-search input").attr("placeholder","关键词不能为空!");
}else{
location.href = "/globalsearch.html?keywords="+encodeuri($(".saf-search input").val())+"&appids=all";
}
})
$("#c_static_001-16717571543760 .e_h3-12").each(function(i){
$(this).click(function(){
$("#c_static_001-16717571543760 .e_h3-12.light").removeclass("light");
$(this).addclass("light");
$("#c_static_001-16717571543760 .e_loop-17 .p_loopitem.light").removeclass("light");
$("#c_static_001-16717571543760 .e_loop-17 .p_loopitem").eq(i).addclass("light");
})
})
$(".header ul li.p_level1item .p_level2box li.p_level2item a, .saf-footernav ul li.p_level1item ul.p_level2box li.p_level2item p.p_menu2item a").click(function() {
var href= $(this).attr("href");
if (href.indexof("training") >= 0){
var divid1 = $(this).attr("href").replace("/training.html","");
$("html, body").animate({
scrolltop: $(divid1).offset().top - 100 }, 1000);
};
if (href.indexof("business") >= 0){
var divid2 = $(this).attr("href").replace("/business.html","");
$("html, body").animate({
scrolltop: $(divid2).offset().top - 100 }, 1000);
};
if (href.indexof("cooperation") >= 0){
var divid3 = $(this).attr("href").replace("/cooperation.html","");
$("html, body").animate({
scrolltop: $(divid3).offset().top - 100 }, 1000);
};
if (href.indexof("pioneer") >= 0){
var divid4 = $(this).attr("href").replace("/pioneer.html","");
$("html, body").animate({
scrolltop: $(divid4).offset().top - 100 }, 1000);
};
});
});
$.fn.svg = function(name, wrapper) {
if (!$.fn.svg_init) {
$.fn.svg_init = !$.fn.svg_init;
setinterval(() => {
$("[cn-svg]").each(function() {
let svg = $(this).attr("cn-svg") || "";
let wrapper = $(this).attr("cn-svg-wrapper");
let index = $(this).attr("cn-svg-index");
$(this).removeattr("cn-svg cn-svg-wrapper cn-svg-index")[svg.indexof("#") > -1 ? "append" : "prepend"]($(".cn-svgs ." + svg.replace("#", "")).find("svg").clone().each((b,a) => {
wrapper && $(a).wrap($("
").addclass(wrapper, wrapper + "-" + ++index));
})[wrapper?"parent":"first"]());
});
}, 60);
}
name && this.each((b,a) => (new regexp("\\+","ig").test(name)?name.slice(0, -1):name.split(",")[b]) && $(a).attr("cn-svg", new regexp("\\+","ig").test(name)?name.slice(0, -1):name.split(",")[b]).attr("cn-svg-wrapper", wrapper || "").attr("cn-svg-index", b));
};
$(()=>{
$("body").svg();
});
$(()=>{
$(".cn-show [saf-loop-swiper]").each(function(i){
let ss = $(this).attr("saf-loop-swiper");
if(ss == "true"){
let auto = $(this).attr("saf-sw-auto").split(",");
if(auto[0] == "true") {
var autoplay = {
delay: parseint(auto[1]),
pauseonmouseenter:true,
disableoninteraction: false,
};
} else {
var autoplay = false;
};
var loop = $(this).attr("saf-sw-loop");
if(loop == "true"){
var loop = true;
}else {
var loop = false;
};
let between = parseint($(this).attr("saf-sw-between"));
let num = $(this).attr("saf-sw-num").split(",");
$(this).find(".p_list").addclass("saf-swiper"+i).children(".p_loopitem").addclass("swiper-slide").css("flex","none").wrapall("
");
let safbar= "
";
$(this).find(".p_list").append(safbar);
$(".saf-swiper"+i+" .s_prev").svg("prev");
$(".saf-swiper"+i+" .s_next").svg("next");
var swiper = new swiper(".saf-swiper"+i+" .swiper-container", {
autoplay:autoplay,
loop:loop,
slidesperview: num[0],
speed:800,
spacebetween: between,
pagination: {
el: ".saf-swiper"+i+" .saf-cn-pagination",
},
navigation: {
nextel: ".saf-swiper"+i+" .s_next",
prevel: ".saf-swiper"+i+" .s_prev",
},
breakpoints: {
0: {
slidesperview: num[3],
spacebetween: between
},
768: {
slidesperview: num[2],
spacebetween: between
},
1024: {
slidesperview: num[1],
spacebetween: between
},
1400: {
slidesperview: num[0],
spacebetween: between
}
}
});
}
})
})
//无数据提示
$(()=>{
$(".p_nodata").each(function(){
$(this).html('
sorry,本栏目暂无数据
当前栏目暂无内容,您可以浏览其他页面或者返回首页
');
})
})
$(()=>{
var mo = $(".saf-mo").attr("saf-mo");
if(mo == "true"){
$("body").addclass("cn-shield-mo").append(`
请先确认电脑端框架
手机端适配在电脑端框架确定后2-3个工作日完成
`);
}
});