window.wd = {}; wd.body = $("body"); wd.width = $(window).width(); wd.height = $(window).height(); wd.wd = (...z) => { if(isFrontEnv()) { $(()=>{ if(z.length == 1) { z[0](); return; } if(z.length == 2) { $(z[0]).each(function() { z[1]($(this)); }); return; } if(z.length == 3) { z[2]($(z[0])); } }); } }; wd.d = (a,b,c) => { let dom = $("<" + (c||"div") + ">"); a && dom.addClass(a); b && dom.appendTo(b); return dom; }; $(function () { if (isFrontEnv()) { wd.history = (a) => { history.scrollRestoration = a || "manual"; }; wd.body.addClass("wd"); wd.raf = (a) => { requestAnimationFrame(a); }; wd.remove_href = (a) => { if(a) { setInterval(()=>{ $("a:not([href='javascript:;'])").attr("href", "javascript:;"); }, 200); } }; $(".p_page").each((a,b) => $(b).find(".page_num").length>1?$(b).addClass("wd-show"):1); wd.remove_img_titlealt = (a) => { if(a) { setInterval(()=>{ $("img[title]").removeAttr("title alt"); }, 200); } }; wd.st = (a, time) => { return setTimeout(()=>{ a(); }, time); }; wd.make = () => { return location.href.includes("thefastmake"); }; wd.log = (a, type="log") => { if(wd.make) { console[type](a); } }; wd.img_alt = () => { if (localStorage.getItem("wd")) { wd.log($("img").toArray().filter(a => a.alt.trim()).map(a => a.alt.trim()), "table"); } }; wd.block = (a) => { if(!a) { return; } wd.body.addClass("wd-shield-mo").append(`

请先确认电脑端框架

手机端适配在电脑端框架确定后2-3个工作日完成

`); }; $("[wa-qr]").each(function() { if(tenant.domain) { new QRCode(this, tenant.domain); return; } new QRCode(this, location.origin); $(this).find("img").attr("alt", "二维码").attr("title", "二维码"); }); $("[wa-ce]").each(function() { $(this).html($(this).html().replace("中企动力成都", "中企动力成都")); }); $("[wa-seo]").each(function() { $(this).html($(this).html().replace("SEO标签", "SEO标签")); }); $("[wa-click-scroll]").each(function() { $(this).click(function() { let a = $(this).attr("wa-click-scroll").split(","); $("html").animate({ scrollTop:$(a[0]).offset().top - (a.length==1?0:$(a[1]).height()) }); }); }); $.fn.svg = function(name, wrapper) { if (!$.fn.svg_init) { $.fn.svg_init = !$.fn.svg_init; setInterval(() => { $("[wa-svg]").each(function() { let svg = $(this).attr("wa-svg") || ""; let wrapper = $(this).attr("wa-svg-wrapper"); let index = $(this).attr("wa-svg-index"); $(this).removeAttr("wa-svg wa-svg-wrapper wa-svg-index")[svg.indexOf("#") > -1 ? "append" : "prepend"]($(".wa-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("wa-svg", new RegExp("\\+","ig").test(name)?name.slice(0, -1):name.split(",")[b]).attr("wa-svg-wrapper", wrapper || "").attr("wa-svg-index", b)); return this; }; $("[wa-sub-img-banner]").parent().addClass("wsb-container").each(function() { $(this).find(".s_title").removeAttr("class").wrapAll("
").each(function(i) { $(this).addClass("w" + (i + 1)).html($(this).text().trim().split("").reduce((a, b) => a + "" + b + "", "")).find("span").each(function(ii) { if (Math.random() > 0.5) { $(this).css("animation-delay", 0.5 + i * 0.1 + Math.random() * 0.3 + "s"); } }); }); $($(this).find("[wa-sub-img-banner]").attr("wa-sub-img-banner")).each((a,b) => $(this).find(".w").css("margin-top", $(b).height() / 2)); }).each(function() { if ($(this).find(".detail").length) { $(this).children(".w").addClass("detail"); } setTimeout(() => { this.classList.add("ws"); }, 10 ** 3); }); $("body").keypress(e => { if((e.ctrlKey || e.metaKey) && e.key.toLowerCase() == "b") { console.log("SAF"); console.log("开始检测链接"); [...new Set($("a").map(function() { if(this.href) { let img = $(this).find("img"); if(img.length) { return this.href + "# 图片 " + img.first().attr("src").split("/").pop(); } return this.href + "#" + this.innerText.trim(); } }))].forEach(a => { a = a.split("#"); let href = a[0]; let text = a[1]; if(!href) { return; } if(href.includes("javascript")) { console.log(href, text); return; } if(!href.includes(location.host)) { console.warn("外链:" + href, text); return; } href = href.slice(location.href.lastIndexOf("/")); if(href.length > 1) { fetch(href).then(a => a).then(a => { if(a.status == "404") { console.error("死链:", href, text); } else { console.log("正常链接:", href, text); } }); } }); } }); $("[wa-scroll]").each(function() { let stop = 0; let config = $(this).attr("wa-scroll").split(","); let selector = config[0]; let speed = (+config[1]) || 1; let hover_stop = config[2] || false; let content = $(this).find(selector); $("
").appendTo($(this).find(".p_list")).find(".wd-scroll-wrapper").append(content); var ul = $(this).find(".wd-scroll-container"); var wrapper = $(this).find(".wd-scroll-wrapper"); var left = 0; Array(2).fill("").forEach(()=> content.clone().appendTo(content.parent())); var width = $(window).width(); ul = ul.get(0); var timer; function run() { if(!stop) { width = wrapper.width() / 3; if (left > width) { left = 0 } left += speed; ul.style.left = -left + "px"; } requestAnimationFrame(run); } run(); if(hover_stop) { content.parent().hover(function() { stop = 1; }, function() { stop = 0; }); } }); $("[wa-license]").each(function(){ let src = $(this).attr("wa-license"); $(this).append(''); $(this).html($(this).html().replace("营业执照","营业执照")); let pop = $("
").addClass("wd-20230226140538").each(function() { let parent = $(this); $.get("/fwebapi/cms/baseConfig/get", s => { console.log(s.data.data.businessImgUrl); var t; s = s.data.data.businessImgUrl, (t = new Image).src = "https://omo-oss-image.thefastimg.com/" + s, t.setAttribute("crossOrigin", "Anonymous"), t.onload = function() { !function(s, t) { if(!$(".businessCanvas").length) { $("body").append('