');
right.append(email).append(phone).append(message).append(top);
wd.body.append(right);
right.find(".wd-item").last().click(function () {
$("html,body").animate({
scrolltop: 0
}, 1000);
});
wd.st(() => {
right.addclass("wd-show");
}, 500);
};
wd.break_line = {
init: function () {
// wd.break_line.init().start();
return this;
},
start: function () {
$("[wa-break-line]").each(function () {
$(this).html("
");
});
return this;
}
};
wd.swiper = {
init: function () {
return this;
},
start: function () {
$("[wa-swiper]").each(function () {
let _this = $(this);
let a = $(this).attr("wa-swiper");
let aa = wd.string_to_object(a);
let config = {
slidesperview: 3,
spacebetween: 30,
centeredslides: false,
loop: false
};
aa.view && (config.slidesperview = aa.view);
aa.center && (config.centeredslides = true);
aa.loop && (config.loop = true);
aa.between && (config.spacebetween = aa.between);
aa.autoplay && (config.autoplay = {
delay: aa.autoplay,
disableoninteraction: false,
pauseonmouseenter: false
});
aa.mobile && (config.breakpoints = {
240: {
slidesperview: aa.mobile,
spacebetween: 0,
},
768: {
slidesperview: config.slidesperview,
spacebetween: config.spacebetween
}
});
$(this).css("display", "block").css("overflow", "hidden");
$(this).find(".p_loopitem").wrap("
").parent().parent().css("display", "block").end().wrapall('
');
if (aa.pagination) {
$(this).find(".swiper").append('');
config.pagination = {
el: _this.find(".swiper-pagination").get(0),
clickable: true
};
}
if (aa.navigation) {
$(this).find(".swiper").append('
');
config.navigation = {
nextel: _this.find('.swiper-button-next').get(0),
prevel: _this.find('.swiper-button-prev').get(0)
};
}
new swiper(_this.find(".swiper").get(0), config);
});
}
};
wd.no_data = {
init: function () {
$("head").append("");
return this;
},
start: function () {
$("[wa-no-data").each(function () {
$(this).find(".p_nodata").each(function () {
$(this).addclass("wd-20230603155427");
$(this).attr("wa-svg", "no-data#");
$(this).html(`
暂无数据!
`);
});
});
}
};
wd.highlight = {
init: function () {
return this;
},
start: function () {
$("[wa-highlight]").each(function () {
let s = $(this).attr("wa-highlight") || "a";
let class_name = "wd-current";
if (s.includes(",")) {
s = s.split(",");
class_name = s[1];
s = s[0];
}
$(this).find("a").each(function () {
if (location.href.includes(this.href)) {
let _this = this;
if (s == "a") {
$(this).addclass(class_name);
} else {
$(s).each(function () {
if (this.contains(_this)) {
$(this).addclass(class_name);
}
});
}
}
});
});
return;
}
};
wd.zj = {
init: function (a) {
this.is_start = a || false;
if (this.is_start) {
wd.body.ac("zj");
}
return this;
},
start: function (fn) {
if (this.is_start) {
fn();
}
return this;
}
}
wd.auto_detail_next_prev_none = {
init: function () {
return this;
},
start: function (text) {
requestanimationframe(function a() {
$(".s_title:contains(无)").not(".wd").each((a, b) => $(b).addclass("wd").each((c, d) => $(d).text().includes("无") ? $(d).html($(d).html().replace("无", text ? text : "none")) : ""));
requestanimationframe(a);
});
return this;
}
};
wd.empty_info = (list, method, content, direct) => {
$(list).each(function () {
if (!direct && $(this).text().trim()) {
return;
}
$(this)[b](c);
});
};
wd.hash = {
init: function (nav) {
let _this = this;
this.nav = nav || "";
this.hash_info = {};
this.prev_hash = "";
$("body").click(e => {
let href = $(e.target).attr("href") || $(e.target).closest("a").attr("href");
if (!_this.nav) {
console.error("hash nav error!");
return;
}
if (href && href.includes("#") && location.href.includes(href)) {
let dom = href.split("#")[1];
if (dom && _this.hash_info[dom]) {
console.log(_this.hash_info[dom]);
e.preventdefault();
$("html,body").animate({
scrolltop: $(_this.hash_info[dom])?.offset()?.top - (_this.nav ? $(_this.nav).height() : 0)
});
}
}
});
$(window).on("load", function () {
let hash = location.hash;
if (hash) {
let dom = hash.split("#")[1];
if (dom && _this.hash_info[dom]) {
$("html").animate({
scrolltop: $(_this.hash_info[dom])?.offset()?.top - (_this.nav_id ? $(_this.nav_id).height() : 0)
});
}
}
});
return this;
},
core: function () {
let _this = this;
let a = location.hash;
if (a && a != _this.prev_hash) {
_this.prev_hash = a;
let b = _this.hash_info[a.slice(1)];
if (b) {
$("html,body").animate({
scrolltop: $(b)?.offset()?.top - (_this.nav ? $(_this.nav).height() : 0)
});
}
}
return _this;
},
start: function () {
let _this = this;
requestanimationframe(function z() {
_this.core();
requestanimationframe(z);
});
return this;
},
add: function (info) {
this.hash_info = object.assign(this.hash_info, info);
this.core();
return this;
}
};
wd.scroll_animation = {
init: function () {
$("[wa--sa]").each(function () {
let a = $(this).attr("wa--sa");
if (a) {
$(a).each(function () {
$(this).attr("wa-sa", "");
});
} else {
$(".p_loopitem", this).each(function () {
$(this).attr("wa-sa", "");
});
}
});
$(".s_title, s_subtitle, .s_summary, .s_img, .s_line, .s_link, .s_body, .s_button1, .btn-primary, [class*='e_credible'], [class*='e_richtext'], [class*='e_provider'], [class*='e_text-'],.p_page ").attr("wa-sa", "");
return this;
},
start:function() {
let timer;
$(window).scroll(() => {
cleartimeout(timer);
timer = settimeout(() => {
this.ani();
}, 200);
});
this.ani();
return this;
},
ani: function () {
let index = 0;
$("[wa-sa]:not('[wa-no-sa]'):not('[wa-sa-ani]')").each(function () {
let top = this.getboundingclientrect().top;
if (top < innerheight) {
index++;
$(this).attr("wa-sad", index);
}
});
$("[wa-sad]").eachh((a) => {
wd.st(() => {
a.removeattr("wa-sad");
a.removeattr("wa-sa");
a.attr("wa-sa-ani", "");
}, a.attr("wa-sad") * 50);
});
},
add: function (a) {
$(a).attr("wa-sa", "");
this.ani();
}
};
wd.forbidden_words = {
init: function () {
this.money_words = [];
this.money_words.push(["国家"]);
this.money_words.push(["完美"]);
this.money_words.push(["第一"]);
this.money_words.push(["引领"]);
this.money_words.push(["领先"]);
this.money_words.push(["优秀"]);
this.money_words.push(["最"]);
return this;
},
start: function () {
let _this = this;
let children = (a) => {
a.contents().each(function () {
if (this.nodetype == 3) {
let text = $(this).text().trim();
if (text) {
_this.money_words.foreach(c => {
if (text.includes(c)) {
this.textcontent = text.replace(new regexp(c[0], "g"), c.length > 1 ? c[1] : "");
}
});
}
} else {
children($(this));
}
});
};
$(".s_title, .s_summary, .s_link").eachh(a => {
children(a);
});
return _this;
},
add: function (...a) {
let _this = this;
if (a) {
_this.money_words.push([a]);
_this.start();
}
return _this;
}
};
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.pc = (a) => {
if (innerwidth > 768) {
a();
}
};
wd.mo = (a) => {
if (innerwidth > 768) {
return;
}
a();
};
wd.cursor = {
init: function () {
this.cursor = wd.d("wd-cursor").get(0);
this.x = 0;
this.y = 0;
wd.body.appendto("body");
},
start: function () {
let _this = this;
document.addeventlistener("mousemove", e => {
_this.x = e.clientx;
_this.y = e.clienty;
wd.ani.to(_this.cursor, _this.x);
wd.ani.to(_this.cursor, _this.y);
});
}
};
wd.mouse_img = (a, children) => {
a.addclass("wd-mouse-img-effect");
if (children) {
a.find("img").wrap("
");
} else {
a.children().wrapall("
");
}
let wc = a.find(".wc");
let b = a.offset().left;
let c = a.width();
let ratio, in_timer;
a.hover(function () {
c = a.width();
in_timer = settimeout(() => {
a.attr("in", "in");
}, 500);
a.mousemove(function (e) {
if (!a.attr("in")) {
return;
}
ratio = ((e.screenx - b) - c / 2) / c;
requestanimationframe(() => {
wc.css("transform", "translatex(" + ratio * 10 + "px) skew(" + ratio * 0.1 + "deg, " + ratio * 0.1 + "deg)");
});
});
}, function () {
cleartimeout(in_timer);
requestanimationframe(() => {
wc.css("transform", "none").removeattr("in");
});
});
};
wd.wa_append = {
init: function () {
return this;
},
start: function () {
$("[wa-append]").each(function () {
let a = $(this).attr("wa-append");
let append = "prepend";
if (a.includes("after")) {
append = "append";
}
let rgba = a.match(/rgba\(\d+,\s*\d+,\s*\d+,\s*(0\.\d+|1)\)/g);
a = a.replace(rgba, "");
a = a.replace("after", "").split(",");
let target = a[0];
let class_name = a[1] || "bg";
let opacity = a[2] || 1;
let color = a[3] || "rgba(0,0,0,0.4)";
if (rgba) color = rgba[0];
let bg = $("
")[append + "to"]($(target).css("z-index", 10));
bg.addclass(class_name).css("opacity", opacity).css("background-color", color).addclass("w20230328211553");
});
return this;
}
}
wd.sub_banner = {
init: function () {
let container = $("[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));
});
container.each(function () {
if ($(this).find(".detail").length) {
$(this).children(".w").addclass("detail");
}
});
this.container = container;
return this;
},
start: function () {
settimeout(() => {
this.container.addclass("ws");
}, 10 ** 3);
}
};
wd.svg = {
init: function () {
return this;
},
start: function () {
setinterval(() => {
$("[wa-svg]").each(function () {
let svg = $(this).attr("wa-svg") || "";
if (!svg) return;
let wrapper = $(this).attr("wa-svg-wrapper");
$(this).removeattr("wa-svg wa-svg-wrapper");
let svg_name = svg.replace("#", "");
let svg_wrapper = $(".wd-svgs ." + svg_name);
$(this)[svg.indexof("#") > -1 ? "append" : "prepend"](svg_wrapper.find("svg").clone().each((b, a) => {
wrapper && $(a).wrap($("
").addclass(wrapper));
})[wrapper ? "parent" : "first"]());
});
}, 60);
return this;
},
svg: function (selector, name, wrapper) {
let _this = this;
$(selector).each((b, a) => {
let name = new regexp("\+", "ig").test(name) ? name.slice(0, -1) : name.split(",")[b];
$(a).attr("wa-svg", name[b]);
if (wrapper) {
$(a).attr("wa-svg-wrapper", wrapper);
}
});
}
};
wd.letters = function () {
let effect = function () {
let a = 0;
let self = this;
let target = $(this).attr("wa-letters") ? $($(this).attr("wa-letters")).filter(function () {
return this.contains(self);
}) : $(this);
target.mouseenter(() => {
if (!a) {
a = 1;
let text = $(this).text().trim();
$(this).height($(this).height());
$(this).text("");
let render = (b) => {
let i = 0, m = b.length;
let r = () => {
$(this).text(b[i]);
i++;
if (i > m - 1) {
a = 0;
return;
}
settimeout(() => {
r();
}, 100 / text.length);
}
r();
};
let w = () => {
let s = [];
let ss = [];
text.split("").foreach((a, b) => {
let substring = text.slice(0, b + 1);
s.push(substring);
});
ss.push("");
ss.push("");
s.foreach((a, b) => {
a.split("").foreach((c, d) => {
array(s.length).fill("").foreach((e, f) => {
let t = c.split("")[f];
if (!t) return;
ss.push(a.slice(0, -1) + t);
});
});
});
render(ss);
};
w();
}
});
};
setinterval(() => {
$("[wa-letters]").not(".wd-in").addclass("wd-in").each(function () {
effect.call(this);
});
}, 500);
}
wd.footer_nav = function () {
let top = $("[wa-nav-top]");
top.length && top.parent().find(top.attr("wa-nav-top") || ".p_level1item").each(function () {
$(this).clone().appendto($("[wa-nav-footer]"));
});
this.scroll_animation.add("[wa-nav-footer] > li");
};
wd.scroll_down = function () {
$("[wa-scroll-down]").each(function () {
$(this).append(`
`);
});
};
wd.auto_update_nav_footer_height = function () {
let top = $("[wa-nav]").closest("[id]");
let footer = $("[wa-footer]").closest("[id]");
let a = function () {
document.documentelement.style.setproperty(`--nav`, top.height() + "px");
document.documentelement.style.setproperty(`--footer`, footer.height() + "px");
}
a();
$(window).resize(function() {
a();
});
$(window).on("load", function() {
a();
let _top = top.height();
let _footer = footer.height();
let __top,__footer;
setinterval(function() {
__top = top.height();
if(__top != _top) {
_top = __top;
a();
}
__footer = footer.height();
if(__footer != _footer) {
__footer = _footer;
a();
}
}, 100);
});
};
wd.sub_cate = function() {
$("[wa-sub-cate]").each(function() {
$("
").addclass("wd-sub-cate-auto").attr("wmc", "").append($(this).find("a").clone().wrap($("
").addclass("wd-item").attr("wa-sa", "")).parent()).insertafter(this).find("a").each(function() {
let a = $(this);
let href = this.href;
if(location.href.includes(href)) {
this.classlist.add("wd-current");
}
});
});
};