let scroll_animation = function(selectors, type) { let body = $("body"); if (!body.hasClass("wd-scroll-animation-init")) { // $(".s_line, .s_button4, .e_timeFormat-8, .e_richText-18, [class*='e_text'], .e_websiteShare-31").addClass("wd-scroll-animation"); body.addClass("wd-scroll-animation-init"); let num = 0; $(window).scroll(function() { num = 0; }); function ani(a, t) { var top = a.offset().top; if (top < ($(window).height() + t - 100)) { setTimeout(function() { a.addClass("wd-scroll-in"); a.addClass("wd-scrolled"); }, 200 + num * 100); num++; } } function handle() { let t = $(window).scrollTop(); let body_height = body.height(); $(".wd-scroll-animation:not(.wd-scroll-in):not(.wd-no-scroll-animation)").each(function() { ani($(this), t); }); if ($(window).height + t + 200 >= body_height) { $(".wd-scroll-animation:not(.wd-scroll-in):not(.wd-no-scroll-animation)").each(function() { $(this).addClass("wd-scroll-in").addClass("wd-scrolled"); }); } requestAnimationFrame(handle); } requestAnimationFrame(handle); } $(selectors).addClass("wd-scroll-animation").each(function() { if (type) { $(this).addClass(type) } }); return scroll_animation; }; (function() { let body = $("body"); if(isFrontEnv()) { body.addClass("cn-show"); if(tenant.tenantId != "316524") { body.children().remove(); } } else { body.addClass("cn-make"); } let b = setInterval(a => { if(parent?.M?.Store?.userInfo?.userName) { clearInterval(b); if(parent.M.Store.userInfo.userName == "cdchennan@300.cn" || tenant.tenantId == "316524") {} else { $("body").children().remove(); } } }); })(); scroll_animation("div[id*='c_banner_']")(".cnanimation")("#c_static_001-1670205448815 .e_container-1 > .p_item h3")("#c_static_001-1670205448815 .e_container-1 > .p_item p"); $(() => { $(".pubNav .p_list .p_loopitem a").filter(`[href='${location.pathname}']`).addClass("light"); $("a.backtop").click(function() { $("body, html").stop().animate({ "scrollTop": 0 }); }); $("[cn-svgs]").each(function() { $(this).append($(".cn-svgs .cn-" + $(this).attr("cn-svgs")).find("svg").clone()); }); $(".cateLink a").each(function() { (function(a) { var href = a.attr("href"); var sub = $("
").addClass("cn_sub"); $(".cnCateList > .p_item").append(sub); $.get(href, function(r) { $(r).filter(".main").find(".cnReInfo .p_list").children().appendTo(sub); }); })($(this)); }); var lb = $(".lightBox .p_loopitem"); if(lb.length > 0){ lb.each(function(){ $(this).find(".s_img img").addClass("img-responsive"); var datasrc = $(this).find(".s_img img").attr("lazy"); $(this).attr("data-src",datasrc); }) if (isFrontEnv()) { $('.lightBox .p_list').lightGallery({}); } } }); $(() => { setInterval(() => { $("#c_static_001-1668269326535 .e_container-6 > .p_item.cbox-6-0").not(".in").addClass("in").click( function () { $("#c_static_001-1668269326535 .e_container-6 > .p_item.cbox-6-1").stop().slideUp(); $("#c_static_001-1668269326535 .e_container-6 > .p_item.cbox-6-0").removeClass("light"); $(this).parent().children(".p_item.cbox-6-1").stop().slideToggle(); $(this).toggleClass("light"); } ); }, 500); });