111 lines
3.9 KiB
JavaScript
111 lines
3.9 KiB
JavaScript
if (
|
||
navigator.appName == "Microsoft Internet Explorer" &&
|
||
parseInt(
|
||
navigator.appVersion.split(";")[1].replace(/[ ]/g, "").replace("MSIE", "")
|
||
) <= 9
|
||
) {
|
||
//document.getElementById('browser-modal').style.display='block';
|
||
$("body").append(
|
||
'<div id="browser-modal"><div class="browser-modal-cover"></div><div class="browser-content"><div class="browser-text"><h3 class="browser-text-title">请升级浏览器版本</h3><p class="browser-text-desc">你正在使用旧版本浏览器。请升级浏览器以获得更好的体验。</p></div><div class="browser-list"><div class="browser-item"><a href="https://www.google.cn/chrome/" target="_blank"><div class="iconfont iconchrome"></div><h4>Chrome</h4></a></div><div class="browser-item"><a href="http://www.firefox.com.cn/" target="_blank"><div class="iconfont iconfirefox"></div><h4>Firefox</h4></a></div><div class="browser-item"><a href="https://www.opera.com/zh-cn" target="_blank"><div class="iconfont iconopera"></div><h4>Opera</h4></a></div><div class="browser-item"><a href="https://www.microsoft.com/zh-cn/edge" target="_blank"><div class="iconfont iconEdge"></div><h4>Edge</h4></a></div></div></div></div>'
|
||
);
|
||
//console.log("您的浏览器版本过低,请使用IE9以上版本");
|
||
}
|
||
|
||
$(".changeT").click(function () {
|
||
var s = $(this).find("span").text();
|
||
var a = $(this).attr("data-a");
|
||
var b = $(this).attr("data-b");
|
||
if (s == b) {
|
||
$(this).find("span").text(a);
|
||
} else {
|
||
$(this).find("span").text(b);
|
||
}
|
||
$(this).find("i").toggleClass("iconart");
|
||
$(this).prev(".infoall").slideToggle();
|
||
$(this).siblings(".infodesc").slideToggle();
|
||
});
|
||
|
||
$(window).scroll(function () {
|
||
var scrollPos = $(window).scrollTop();
|
||
if (scrollPos > 0) {
|
||
$("body").addClass("scrolling");
|
||
} else {
|
||
$("body").removeClass("scrolling");
|
||
}
|
||
if (scrollPos > 600) {
|
||
$(".rightFix").fadeIn();
|
||
} else {
|
||
$(".rightFix").fadeOut();
|
||
}
|
||
});
|
||
$(function () {
|
||
var scrollPos = $(window).scrollTop();
|
||
if (scrollPos > 0) {
|
||
$("body").addClass("scrolling");
|
||
} else {
|
||
$("body").removeClass("scrolling");
|
||
}
|
||
if (scrollPos > 600) {
|
||
$(".rightFix").fadeIn();
|
||
} else {
|
||
$(".rightFix").fadeOut();
|
||
}
|
||
});
|
||
|
||
$(".sub-nav-p-s").click(function (e) {
|
||
$(this).next(".sub-nav-p").slideToggle();
|
||
$(this).toggleClass("on");
|
||
$(document).one("click", function () {
|
||
$(".sub-nav-p").slideUp();
|
||
$(".sub-nav-p-s").removeClass("on");
|
||
});
|
||
e.stopPropagation();
|
||
});
|
||
|
||
$(".navp").each(function () {
|
||
$(this).click(function () {
|
||
$(this).parent().siblings().find(".subNavm").slideUp();
|
||
$(this).parent().siblings().removeClass("on");
|
||
$(this).parent().toggleClass("on");
|
||
$(this).next().slideToggle();
|
||
});
|
||
});
|
||
|
||
$(".menu-btn").click(function () {
|
||
$("html").toggleClass("drawerMenu-open");
|
||
$(".subNav").toggleClass("on");
|
||
// $("body").toggleClass('fixdbody');
|
||
});
|
||
|
||
$(".toSearch").click(function () {
|
||
$(".cd-popup").addClass("is-visible");
|
||
});
|
||
$(".close_btn").click(function () {
|
||
$(".cd-popup").removeClass("is-visible");
|
||
});
|
||
|
||
// AOS.init({
|
||
// offset:0,
|
||
// easing: 'liner',
|
||
// duration: 1000,
|
||
// disable: 'mobile'
|
||
// });
|
||
|
||
// 适配缩放
|
||
// var zoom = window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI; ;
|
||
// //console.log(zoom);
|
||
// if (!!window.ActiveXObject || "ActiveXObject" in window) {
|
||
// if (zoom != 1 && zoom !=2 && zoom !=3) {
|
||
// // AOS.init({disable: true});
|
||
// alert('系统检测到您的设备对显示进行放大,可能导致页面显示不全,请调整后打开/或使用其他浏览器!')
|
||
// }
|
||
// } else {
|
||
// if($(window).width()>=1280){
|
||
// if (zoom != 1 && zoom !=2 && zoom !=3) {
|
||
// // AOS.init({disable: true});
|
||
// var c = document.querySelector('body');
|
||
// c.style.zoom = -0.62 * zoom + 1.65;
|
||
// }
|
||
// }
|
||
// }
|