This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>

Search
  • Huawei Blogs

    Exchange ideas with top technical experts and developers.

Recommendations

Why campuses hold the key to accelerating a net zero future

A campus is a bitesize chunk of city. Therefore, addressing the campus as a building block is key to helping cities transition to a more sustainable future. Cities tend to be developed or redeveloped in phases, often consisting of one or more city blocks, especially when sub-developers are involved.

The Arts of Digital Banking - Remodeling FOCUS

Analyze the driving forces and challenges of bank transformation under the digital trend; Describe Huawei's insights into key areas of bank digitalization and the recommended methods for remodeling the digital capability model.

"5G + Wi-Fi + IoT" Convergence, Opening Up a New Blue Ocean for Enterprise Wireless

The "5G + Wi-Fi + IoT" converged campus network solution brings new value to more industries and extend from office campuses to production campuses. The full potential of this hyper-converged campus network solution will be seen especially in healthcare, large enterprise, manufacturing, port, warehousing, and other scenarios, where it will accelerate industry digital transformation and maximize enterprise digital productivity.

Filling Genomics' Biggest Gap

Huawei's High-Performance Data Analytics Solution helped to shorten the hospital’s genome sequencing analysis time from 24 hours to just seven minutes.

Native Hard Pipe: Building a Reliable All-Optical Foundation for Industrial Digital Transformation

Huawei expects the NHP-enabled optical network to become a reliable foundation for building a fully connected, intelligent, and green world.

All Posts

    Back
    Filter Content
  • By Product
  • By Industry
  • By Product Portfolio
    • By Topic
      Filter Conditions

TOP

', this.e_zoom_viewbox = '
Huawei
', $('body').append(this.e_zoom_full), $('body').append(this.e_zoom_viewbox), this.clickEvent() }, clickEvent: function () { var o = this, t = o.moduleObj.find(".e-zoom-full"), i = o.moduleObj.find(".e-zoom-viewbox"), e = o.moduleObj.find(".e-zoom-viewbox .close-full"); t.on("click", function () { o.winw = o.win.width(), "pc" == $(this).parent(".e-zoom-v2").attr("data-ezoom") && o.winw > 992 ? $(this).next().addClass("z_pc") : $(this).next().removeClass("z_pc"); var t = $(this).prev().find("img").attr("data-original"); $(this).next().find("img").attr("src", t), $(this).next().fadeIn(400), $("body").css("overflow", "hidden"), o.e_Zoom($(this).next().find("img")) }), e.on("click", function () { i.fadeOut(400), $("body").css("overflow", "auto") }), i.on("click", function () { i.fadeOut(400), $("body").css("overflow", "auto") }) }, e_Zoom: function (o) { function t(o) { u = parseInt(o.css("left")), l = parseInt(o.css("top")), d = o.width(), f = o.height() } var i, e, n, s, c, a, h, u, l, d, f, r = !1, m = o, p = m.width(), v = m.height(), g = (parseFloat(p / v), []), w = parseInt(o.css("top")); $(document).on("touchstart touchmove touchend", o, function (v) { var z = o; touch1 = v.originalEvent.targetTouches[0], touch2 = v.originalEvent.targetTouches[1], fingers = v.originalEvent.touches.length, "touchstart" == v.type ? 2 == fingers ? (i = Math.abs(touch1.pageX - touch2.pageX), r = !1) : 1 == fingers && (s = touch1.pageX, a = touch1.pageY, r = !0) : "touchmove" == v.type ? 2 == fingers ? (e = Math.abs(touch1.pageX - touch2.pageX), n = e - i, z.css({ width: p + n })) : 1 == fingers && (c = touch1.pageX, h = touch1.pageY, r && z.css({ left: u + (c - s), top: l + (h - a) })) : "touchend" == v.type && (p = m.width(), t(z), g = [[u, l - w, d, f], [0, 0, 640, 640]]) }); var z = function () { return g }; return { imgData: z } } }; t.init() } $(".e-zoom-v2").each(function () { var o = $(this); o.data("init") || (o.data("init", !0), e_zoomFun($(this))) }) } if ($('.e-module-202208270930').length > 0) { function module202208270930Fun($target) { var module202208270930Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.setShowHide(); this.clickEvent(); }, setShowHide: function () { var _this = this; var lang = $("#gLanguageCurrent").val(); _this.cookie_name = "browsehappy"; if (lang == "en" || lang == "en-gb" || lang == "fr-fr" || lang == "de" || lang == "it" || lang == "es") { _this.cookie_name = "browsehappy_other"; } if ($.cookie(_this.cookie_name)) { return false; } else { _this.moduleObj.slideDown(function () { $(this).trigger("slideEnd"); _this.win.trigger("scroll"); }); } }, clickEvent: function () { var _this = this; _this.moduleObj.find('a.close').click(function () { $(this).parents('.browsehappy').slideUp(function () { $(this).trigger("slideEnd"); _this.win.trigger("scroll"); $.cookie(_this.cookie_name, 'browsehappy', { expires: 30, path: '/', domain: 'huawei.com' }) }); }) }, }; module202208270930Obj.init(); } // 初始化 $('.e-module-202208270930').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208270930Fun($(this)); }) } if ($('.e-module-202208180950').length > 0) { function module202208180950Fun($target) { var module202208180950Obj = { init: function () { // 获取属性 this.moduleObj = $target; this.clickEvent(); }, clickEvent: function () { var _this = this; _this.moduleObj.on("click", ".worldwide-link", function () { var $this = $(this); if ($this.hasClass("active")) { $this.removeClass("active"); } else { $this.addClass("active").siblings().removeClass("active"); } if ($this.hasClass("web-contact")) { // 网站 $(".top-nav-content").find(".worldwide-contact").slideUp(200); $(".top-nav-content").find(".web-contact").slideToggle(200); } else if ($this.hasClass("worldwide-contact")) { // 语言 $(".top-nav-content").find(".web-contact").slideUp(200); $(".top-nav-content").find(".worldwide-contact").slideToggle(200) } }) } }; module202208180950Obj.init(); } // 初始化 $('.e-module-202208180950').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208180950Fun($(this)); }) } // 获取对象 var resourceObj = $('.e-module-202209210900'); if (resourceObj && resourceObj.length > 0) { var win = $(window), win_w = win.width(), wap_width = 992, isPc = win_w > wap_width, header = $('.zl-pc-header-box'), headerNew = $(".header-new"), // 菜单导航 pc navUl = $("nav-new .nav-ul"), // 菜单 nav = $("nav.nav"), // 搜索 search = $(".header-new .search-btn"), searchBox = $(".search-con-box"), searchClose = resourceObj.find(".close-search"), searchInput = resourceObj.find(".support_input_focus"), inputInfohint = $(".inputInfohint").val(), headerTop = headerNew.outerHeight() var res1 = $('.e-module-202208270930'); var res2 = $('.e-module-202208180950') var resH1 = ''; var resH2 = ''; var windowth = $(window).width(); var language = $("#gMarketingLang2").val(); var historySearch = ""; if ($("#historySearch").length > 0) { historySearch = "," + $("#historySearch").val() + "," } var switchSearch = ""; if ($("#switchSearch").length > 0) switchSearch = "," + $("#switchSearch").val() + "," //if (historySearch.indexOf("," + language + ",") > -1) getHistory(); // 版本升级,结构修改,为了不影响线上页面乱的情况,又不重新开发,暂时只能用js来增加calss if (resourceObj.find('.first-iteration').length > 0) { resourceObj.addClass('first-iteration'); } //滚动导航定位到顶部 $(window).on('scroll.202209210900', function () { fixedFun(); }) function fixedFun() { var t = win.scrollTop(); if (res1.css('display') == 'block') { resH1 = res1.height() } var headerTopH = resourceObj.height() + resH1 - 10 if (t > headerTopH) { headerNew.addClass("fixed"); $('.nav-main-box').addClass('blacknone'); } else { headerNew.removeClass("fixed") $('.nav-main-box').removeClass('blacknone'); }; } fixedFun(); //搜索点击 search.on('click', function () { $('.newpcbg').hide(); $('.nav-new').hide(); $('.header-new .ui-menu-show2').hide(); $('body').css('overflow', 'hidden') // 展开搜索 searchBox.addClass("searching"); $('.header-new .search-con-box.searching').fadeIn(); if (win_w < 1200) { $('.header-new .search-con-box .searching-box').addClass("active"); } else { $('.header-new .search-con-box .searching-box').slideDown(); } searchInput.attr('placeholder', inputInfohint); if (historySearch.indexOf("," + language + ",") > -1) { getHistory(); } if (switchSearch.indexOf("," + language + ",") > -1) { getHotSearch(); } if ($('.header-new .ui-menu-show1.search-history').find("a").length > 0) { $('.header-new .ui-menu-show1.search-history').show(); $('.header-new .ui-menu-show1.search-history-title').show(); } else { $('.header-new .ui-menu-show1.search-history').hide(); $('.header-new .ui-menu-show1.search-history-title').hide(); } if ($('.header-new .ui-menu-show1.search-hot').find("a").length > 0) { $('.header-new .ui-menu-show1.search-hot').show(); $('.header-new .ui-menu-show1.search-hot-title').show(); } else { $('.header-new .ui-menu-show1.search-hot').hide(); $('.header-new .ui-menu-show1.search-hot-title').hide(); } if ($('.header-new .zl-pc-searching-tip').find("a").length > 0) { $(".header-new .zl-pc-searching-tip").show(); } else { $(".header-new .zl-pc-searching-tip").hide(); } if (win_w < 1200) { $('.main-header').hide() } }) //关闭搜索 searchClose.on('click', function () { // 20220915 $('.nav-new').show(); $('body').css('overflow', 'auto') // 关闭搜索 if (win_w < 1200) { $('.header-new .search-con-box .searching-box').removeClass("active"); } else { $('.header-new .search-con-box .searching-box').slideUp(); } $('.header-new .search-con-box.searching').fadeOut(); $('.newpcbg').fadeOut(); $('.wap-two').slideUp(); searchInput.removeClass('active'); $('.header-new .clear-search').hide(); searchInput.val(''); $('.header-new .nav-new .nav-ul-mob .wap-first.active').removeClass('active') setTimeout(function () { searchBox.removeClass("searching"); }, 500) $(".header-new .ui-menu-show2.search-direct").empty(); $(".header-new .ui-menu-show2.search-suggest").empty(); $('.header-new .searching-tip').hide(); if (win_w < 1200) { $('.main-header').show() } }) // 20221010 $('body').delegate('.search-con-box.searching', 'click ', function () { $('.nav-new').show(); $('body').css('overflow', 'auto') // 关闭搜索 $('.header-new .search-con-box .searching-box').slideUp(); $('.header-new .search-con-box.searching').fadeOut(); $('.newpcbg').fadeOut(); $('.wap-two').slideUp(); searchInput.removeClass('active'); $('.header-new .clear-search').hide(); searchInput.val(''); setTimeout(function () { searchBox.removeClass("searching"); }, 500) $('.header-new .searching-tip').hide(); if (win_w < 1200) { $('.main-header').show() } }) $('.searching-box').click(function (e) { e.stopPropagation(); }) //搜索框内容 searchInput.focus(function () { searchClear($(this)); var obj = $(this).parent(); if ($(this).val() == "") { obj.find('.ui-menu-show2').hide(); if (historySearch.indexOf("," + language + ",") > -1) { getHistory(); } if (obj.find('.ui-menu-show1.search-history').find("a").length > 0) { obj.find('.ui-menu-show1.search-history').show(); obj.find('.ui-menu-show1.search-history-title').show(); } else { obj.find('.ui-menu-show1.search-history').hide(); obj.find('.ui-menu-show1.search-history-title').hide(); } if (obj.find('.ui-menu-show1.search-hot').find("a").length > 0) { obj.find('.ui-menu-show1.search-hot').show(); obj.find('.ui-menu-show1.search-hot-title').show(); } else { obj.find('.ui-menu-show1.search-hot').hide(); obj.find('.ui-menu-show1.search-hot-title').hide(); } if (obj.find('.zl-pc-searching-tip').find("a").length > 0) { obj.find(".zl-pc-searching-tip").show(); } else { obj.find(".zl-pc-searching-tip").hide(); } } $(this).addClass('active'); }); $('.ui-menu-del .icon-shanchu0914').click(function () { $(this).parent().hide(); $(this).parent().next().hide(); searchValueWords = []; if (historySearch.indexOf("," + language + ",") > -1) { DelCookieNew("search_history_kw"); } }) var debounce = function (func, wait) { var timeout; return function executedFunction() { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } var later = function () { timeout = null; func.apply(void 0, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); }; }; function EnterSupportSearch(o) { var event = window.event || arguments.callee.caller.arguments[0]; if (event.keyCode == 13) { $(o).parents(".productSupportDivNew").find('.ui-menu-show2').hide(); $(o).parents(".productSupportDivNew").find('.ui-menu-show1').hide(); $(o).parents(".productSupportDivNew").find(".zl-pc-searching-tip").hide(); $(o).parents(".productSupportDivNew").find(".Find_support").trigger("click"); return false; } } window.EnterSupportSearch = EnterSupportSearch; //键盘事件 searchInput.bind('input propertychange', debounce(function () { var obj = searchInput.parent(); if (searchInput.val() == '') { obj.find('.ui-menu-show2').hide(); obj.find(".ui-menu-show2.search-direct").empty(); obj.find(".ui-menu-show2.search-suggest").empty(); if (obj.find('.ui-menu-show1.search-history').find("a").length > 0) { obj.find('.ui-menu-show1.search-history').show(); obj.find('.ui-menu-show1.search-history-title').show(); } else { obj.find('.ui-menu-show1.search-history').hide(); obj.find('.ui-menu-show1.search-history-title').hide(); } if (obj.find('.ui-menu-show1.search-hot').find("a").length > 0) { obj.find('.ui-menu-show1.search-hot').show(); obj.find('.ui-menu-show1.search-hot-title').show(); } else { obj.find('.ui-menu-show1.search-hot').hide(); obj.find('.ui-menu-show1.search-hot-title').hide(); } if (obj.find('.zl-pc-searching-tip').find("a").length > 0) { obj.find(".zl-pc-searching-tip").show(); } else { obj.find(".zl-pc-searching-tip").hide(); } obj.find('.clear-search').hide(); } else { obj.find('.clear-search').show(); if (switchSearch.indexOf(language) > -1) { var param = {}; param.language = $("#gMarketingLang1").val(); param.site = $("#gMarketingLang2").val(); param.keyword = encodeURIComponent(searchInput.val()); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; Promise.all([ $.ajax({ url: "https://e.huawei.com/external/api/services/starling/services/api/dynamic/apiserver/searchforsuggest", type: "POST", data:JSON.stringify({ "queryText": param.keyword, "serviceTag": "ebg", "customParams": [ { "customParamName": "language", "customParamValue": "en" }, { "customParamName": "site", "customParamValue": "sg" } ], "userId": "123456" }), 'contentType': 'application/json', headers: { 'X-Hw-Id':"com.huawei.meta.crm.marketingcloud.pep.hw", 'x-meta-renter':'ebg' }, success: function (response) { if (response != undefined) { obj.find('.ui-menu-show1').hide(); obj.find('.ui-menu-show2.search-suggest-title').hide(); obj.find('.ui-menu-show2.search-suggest').hide(); obj.find(".ui-menu-show2.search-suggest").empty(); if (response.data != undefined && response.data.length > 0) { var html = ""; for (var i = 0; i < response.data.length; i++) { html += "" + response.data[i].suggestword + "" } obj.find(".ui-menu-show2.search-suggest").empty().html(html); obj.find('.ui-menu-show2.search-suggest-title').show(); obj.find('.ui-menu-show2.search-suggest').show(); } else { obj.find('.ui-menu-show2.search-suggest-title').hide(); obj.find('.ui-menu-show2.search-suggest').hide(); } obj.find(".zl-pc-searching-tip a").not("[href]").off().on("click", function () { obj.find("#txtSearch_Navigation").val($(this).attr("title")); obj.find('.clear-search').show(); obj.find(".support_input_focus").trigger("propertychange"); obj.find(".Find_support").trigger("click"); obj.find(".zl-pc-searching-tip").hide(); }); } } }), $.ajax({ url: "https://e.huawei.com/external/api/services/starling/services/api/dynamic/apiserver/searchdirect", type: "POST", data:JSON.stringify({ "userId": "123456", "serviceTag": "partner", "customParams": [ { "customParamName": "language", "customParamValue": "en" }, { "customParamName": "site", "customParamValue": "sg" } ], "queryText":param.keyword }), 'contentType': 'application/json', headers: { 'X-Hw-Id':"com.huawei.meta.crm.marketingcloud.pep.hw", 'x-meta-renter':'ebg' }, success: function (response) { if (response != undefined) { obj.find('.ui-menu-show1').hide(); obj.find('.ui-menu-show2.search-direct-title').hide(); obj.find('.ui-menu-show2.search-direct').hide(); obj.find(".ui-menu-show2.search-direct").empty(); if (response.data != undefined && response.data.length > 0) { var html = ""; for (var i = 0; i < response.data[0].data.length; i++) { if (response.data[0].data[i] != "") { html += "" + response.data[0].data[i].itemTitle + "" } } obj.find(".ui-menu-show2.search-direct").empty().html(html); obj.find('.ui-menu-show2.search-direct-title').show(); obj.find('.ui-menu-show2.search-direct').show(); if(!html){ obj.find('.ui-menu-show2.search-direct-title').hide(); obj.find('.ui-menu-show2.search-direct').hide(); } } obj.find(".zl-pc-searching-tip a").not("[href]").off().on("click", function () { obj.find("#txtSearch_Navigation").val($(this).attr("title")); obj.find('.clear-search').show(); obj.find(".support_input_focus").trigger("propertychange"); obj.find(".Find_support").trigger("click"); obj.find(".zl-pc-searching-tip").hide(); }); obj.find('.clear-search').show(); $(".header-new .zl-pc-searching-tip").show(); } } }) ]).then(responses => { if(responses[0]?.data?.length > 0 || responses[1]?.data[0]?.data?.length > 0) { $(".header-new .zl-pc-searching-tip").show(); } else{ $(".header-new .zl-pc-searching-tip").hide(); } }) } } }, 300)) function getHistory(isSearched) { $('.header-new .ui-menu-show1.search-history-title').hide(); $('.header-new .ui-menu-show1.search-history').hide(); $(".header-new .ui-menu-show1.search-history").empty(); var cookieHis = getCookie("search_history_kw"); var searchInput = $('#txtSearch_Navigation'); var searchValue = searchInput.val(); if (cookieHis != null && cookieHis != "") { var history = JSON.parse(cookieHis); if (history != undefined && history != null) { var html = ""; for (var obj in history) { if (obj != "") { html += "" + obj + ""; } } if (html.length > 0) { $(".header-new .ui-menu-show1.search-history").empty().html(html); $('.header-new .ui-menu-show1.search-history-title').show(); $('.header-new .ui-menu-show1.search-history').show(); $(".header-new .zl-pc-searching-tip .ui-menu-show1.search-history a").not("[href]").off().on("click", function () { var obj = $(this).parents(".productSupportDivNew"); obj.find("#txtSearch_Navigation").val($(this).attr("title")); obj.find('.clear-search').show(); obj.find(".support_input_focus").trigger("propertychange"); obj.find(".Find_support").trigger("click"); obj.find(".zl-pc-searching-tip").hide(); }); } } } } function getHotSearch() { $('.header-new .ui-menu-show1.search-hot-title').hide(); $('.header-new .ui-menu-show1.search-hot').hide(); $(".header-new .ui-menu-show1.search-hot").empty(); var param = {}; var xhr = new XMLHttpRequest(); xhr.withCredentials = true; $.ajax({ url: "https://e.huawei.com/external/api/services/starling/services/api/dynamic/apiserver/searchhot", type: "POST", async: false, data:JSON.stringify({ "userId": "123456", "serviceTag": "partner", "customParams": [ { "customParamName": "language", "customParamValue": "en" }, { "customParamName": "site", "customParamValue": "sg" } ] }), 'contentType': 'application/json', headers: { 'X-Hw-Id':"com.huawei.meta.crm.marketingcloud.pep.hw", 'x-meta-renter':'ebg' }, success: function (response) { if (response.data.data != undefined && response.data.data.length > 0) { var html = ""; for (var i = 0; i < response.data.data.length; i++) { if (response.data.data[i] != "") { html += "" + response.data.data[i].searchTxt + ""; } } $(".header-new .ui-menu-show1.search-hot").empty().html(html); $('.header-new .ui-menu-show1.search-hot-title').show(); $('.header-new .ui-menu-show1.search-hot').show(); $(".header-new .zl-pc-searching-tip .ui-menu-show1.search-hot a").not("[href]").off().on("click", function () { var obj = $(this).parents(".productSupportDivNew"); obj.find("#txtSearch_Navigation").val($(this).attr("title")); obj.find('.clear-search').show(); obj.find(".support_input_focus").trigger("propertychange"); obj.find(".Find_support").trigger("click"); obj.find(".zl-pc-searching-tip").hide(); }); } else { $(".header-new .ui-menu-show1.search-hot").empty().html(""); } $(".header-new .zl-pc-searching-tip").show(); } }) } function OpenTheSearch(key) { if (key != "") { var keyword = key; var switchSearch = ""; if ($("#switchSearch").length > 0) { switchSearch = "," + $("#switchSearch").val() + "," } if (switchSearch.indexOf("," + language + ",") > -1) { try { if ($("#categorytype").val() != undefined && $("#categorytype").val() != '') { window.open("//e.huawei.com/" + $("#hidLangRegionName").val() + "/marketingsearch/web/#/?lang=" + $("#gMarketingLang1").val() + "&site=" + $("#gMarketingLang2").val() + "&keyword=" + encodeURIComponent(keyword) + "&getitAddress=" + encodeURIComponent("lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=" + $("#categorytype").val() + "&keyword=" + keyword)); } else { window.open("//e.huawei.com/" + $("#hidLangRegionName").val() + "/marketingsearch/web/#/?lang=" + $("#gMarketingLang1").val() + "&site=" + $("#gMarketingLang2").val() + "&keyword=" + encodeURIComponent(keyword) + "&getitAddress=" + encodeURIComponent("lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=ALL&keyword=" + keyword)); } } catch (ex) { window.open("//e.huawei.com/" + $("#hidLangRegionName").val() + "/marketingsearch/web/#/?lang=" + $("#gMarketingLang1").val() + "&site=" + $("#gMarketingLang2").val() + "&keyword=" + encodeURIComponent(keyword) + "&getitAddress=" + encodeURIComponent("lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=ALL&keyword=" + keyword)); } } else { keyword = encodeURIComponent(key); try { if ($("#categorytype").val() != undefined && $("#categorytype").val() != '') { window.open("//e.huawei.com/enterprisesearch?lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=" + $("#categorytype").val() + "&keyword=" + keyword); } else { window.open("//e.huawei.com/enterprisesearch?lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=ALL&keyword=" + keyword); } } catch (ex) { window.open("//e.huawei.com/enterprisesearch?lang=" + $("#gSupportLang1").val() + "#lang=" + $("#gSupportLang2").val() + "&type=ALL&keyword=" + keyword); } } } } function DelCookieNew(name) { var exp = new Date(); //当前时间 exp.setTime(exp.getTime() - 1); var cval = GetCookieValueNew(name); if (cval != null) document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ";path=/"; } function GetCookieValueNew(name) { var arrVal = document.cookie.match(new RegExp("(^| )" + name + "=([^;]*)(;|$)")); if (arrVal != null) return arrVal[2]; return null; } $(".header-new .Find_support,.e-module-202211220925 .Find_support").click(function () { var type = $(this).parents('.productSupportDivNew').data("type"); var key = $(this).parents('.productSupportDivNew').find(".support_input_focus").val(); ///关键字 var lang = $(this).parents('.productSupportDivNew').find(".Find_Language").val(); ///语言 if (lang == undefined || lang == "") { lang = "en"; } if (type == "all") { OpenTheSearch(key); } else { window.open(supportUrl + "/enterprisesearch?lang=" + lang + "#type=searchAll&keyword=" + key); } var historySearch = ""; if ($("#historySearch").length > 0) { historySearch = "," + $("#historySearch").val() + "," } var searchInput = $('#txtSearch_Navigation'); var searchValue = searchInput.val(); if (!searchValueWords?.includes(searchValue)) { searchValueWords.push(searchValue); }else{ searchValueWords = searchValueWords.filter(item => item !== searchValue); searchValueWords.push(searchValue); } //setCookie("search_history_kw", JSON.stringify(searchValueWords), null, 720); getHistory(); }); var searchValueWords = []; try{ searchValueWords = Array.from(Object.keys(JSON.parse(getCookie("search_history_kw")))) ?? [] } catch{ searchValueWords = [] } $('#txtSearch_Navigation').keypress(function (e) { var key = e.which; var searchInput = $('#txtSearch_Navigation'); var searchValue = searchInput.val(); if (key == 13) { var type = $(this).parents('.productSupportDivNew').data('type'); var key = $(this).parents('.productSupportDivNew').find('.support_input_focus').val(); var lang = $(this).parents('.productSupportDivNew').find('.Find_Language').val(); if (lang == undefined || lang == '') { lang = 'en'; } if (type == 'all') { OpenTheSearch(key); } else { window.open(supportUrl + '/enterprisesearch?lang=' + lang + '#type=searchAll&keyword=' + key); } if (!searchValueWords?.includes(searchValue)) { searchValueWords.push(searchValue); }else{ searchValueWords = searchValueWords.filter(item => item !== searchValue); searchValueWords.push(searchValue); } //setCookie("search_history_kw", JSON.stringify(searchValueWords), null, 720); getHistory(); return false; } }); $('#txtSearch_Navigation').keyup(function (e) { var key = e.which; if (key == 8) { $(".ui-menu-show2.search-direct").empty(); $(".ui-menu-show2.search-suggest").empty(); return false; } }); searchInput.blur(function () { searchShow($(this)); }); $('.headerNew .clear-search').on('click', function () { searchInput.val(''); $(".header-new .ui-menu-show2.search-direct").empty(); $(".header-new .ui-menu-show2.search-suggest").empty(); $(this).parent().find(".zl-pc-searching-tip").hide(); searchInput.removeClass('active'); $(this).hide(); }) /** * 输入框获取焦点 */ function searchClear(_this) { var inputInfohint = $(_this).parents('.productSupportDivNew').find(".inputInfohint").val(); var put = $(_this).parents('.productSupportDivNew').find(".support_input_focus"); if (put.val() == inputInfohint) { put.val(""); } }; /** * 输入框失去焦点 */ function searchShow(_this) { var inputInfohint = $(_this).parents('.productSupportDivNew').find(".inputInfohint").val(); var put = $(_this).parents('.productSupportDivNew').find(".support_input_focus"); if (put.val().length <= 0) { put.attr('placeholder', inputInfohint); } setTimeout(function () { $(_this).parents('.search-con-box.searching').find(".searching-tip").css('display', 'none'); }, 500) } // 20220919PC端导航添加样式 // 下拉导航灰色背景宽度 function bgcolor() { // 如何购买 var windowth = $(window).width(); var dw = $('.e-cistern-l').width(); //pc导航宽度; var buyw = $('.buy-shop').outerWidth(); //购买商城宽度; var bw = (parseInt(windowth) - parseInt(dw)) / 2 + parseInt(buyw); //购买背景宽度; //如姐购买宽度; $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item.four .buy-bg').css({ 'width': bw, 'z-index': '-1' }); //了解我们 var usw = $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1.five .level-one-li:first-child').outerWidth(); //了解我们宽度; var usbgw = (parseInt(windowth) - parseInt(dw)) / 2 + parseInt(usw); //了解我们背景宽度; //了解我们宽度; $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item.five .us-bg').css({ 'width': usbgw, 'z-index': '-1' }); //学习与技术支持 var lew = $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1.two .level-one-li:nth-child(4)').outerWidth(); //学习与技术支持宽度; var learnbgw = (parseInt(windowth) - parseInt(dw)) / 2 + parseInt(lew); //学习与技术支持背景宽度; //学习与技术支持宽度; $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item.two .learn-bg').css({ 'width': learnbgw, 'z-index': '-1' }); //产品解决方案 var prw = $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1.one .level-one-li:nth-child(1)').outerWidth(); //学习与技术支持宽度; var prbgw = (parseInt(windowth) - parseInt(dw)) / 2 + parseInt(prw); //产品解决方案背景宽度; //产品解决方案宽度; $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item.one .pr-bg').css({ 'width': prbgw, 'z-index': '-1' }); } $(window).resize(function () { // 下拉导航灰色背景宽度 bgcolor() if (windowth > 1200) { $('.header-new').addClass('on') // PC端点击二级展开三级导航 $('.level-two-li-link').on('click', function () { $(this).addClass("active"); $(this).siblings().removeClass('active'); $(this).siblings().find('.wap-item-list3').removeClass("active") $(this).find('.wap-item-list3').addClass("active"); }) } else { $('.header-new').removeClass('on'); } }) if (windowth > 1200) { $('.header-new').addClass('on') $('.header-new.on .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1 .level-one-li .wap-item-list2 .level-two-li:first-child .wap-item-list3').addClass('active'); $('.header-new.on .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1 .level-one-li .wap-item-list2 ').eq(0).find('.level-two-li:first-child').addClass('active'); $('.header-new.on .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1.two .level-one-li').eq(3).find('.level-two-li:first-child').addClass('active'); // 下拉导航 $('.wap-two .wap-con').eq(0).addClass('active').siblings().removeClass('active'); // 下拉导航灰色背景宽度 bgcolor() // PC端点击二级展开三级导航 // 产品解决方案 $('.level-two-li1').on('click', function () { $(this).addClass("active"); $(this).siblings().removeClass('active'); $(this).siblings().find('.wap-item-list3').removeClass("active") $(this).find('.wap-item-list3').addClass("active"); // 获取左边的高度,赋值给右边内容框 var _index = $(this).index() box1TabConH(_index); }) // pc学习与技术支持 $('.level-two-li2').on('click', function () { $(this).addClass("active"); $(this).siblings().removeClass('active'); $(this).siblings().find('.wap-item-list3').removeClass("active") $(this).find('.wap-item-list3').addClass("active"); // 获取左边的高度,赋值给右边内容框 var _index = $(this).index() box1TabConH2(_index) // return false; }) } else { $('.header-new').removeClass('on') $('.newpcbg').hide(); $('.nav-ul-mob').addClass('active'); //mob端展开导航 $("#mob-menubtn").on("click", function () { $('.nav-new').addClass('open'); $('#close-menubtn').show(); $('#mob-menubtn').hide(); $('.nav-mob-btns').show(); $('.search-btn').hide() $('body').css('overflow', 'hidden') }) //mob端关闭导航 $("#close-menubtn").on("click", function () { if (document.querySelector('.e-module-202208180950').style.display == 'block') { res2.hide() $(".top-nav-content").hide() } else { $('.nav-new').removeClass('open'); $('#close-menubtn').hide(); $('#mob-menubtn').show(); $('.nav-mob-btns').hide() $('.search-btn').show() $('body').css('overflow', 'auto') } }) //mob主导航点击 $('.wap-one-ul li').on('click', function () { var _index = $(this).index(); $('.wap-two').addClass('active'); $('.wap-two.active').show(); $('.wap-first').addClass('active'); $('.wap-two .wap-con').eq(_index).addClass('active').siblings().removeClass('active'); $('.wap-two .wap-con').eq(_index).find('.nav-mob-btns').show() $('.nav-ul-mob').removeClass('active'); }) //返回主菜单 $('.back-pre').on('click', function () { $('.wap-two').removeClass('active'); $('.wap-first').removeClass('active'); $('.level-one-li').removeClass('active'); $('.level-one-li').find('.wap-item-list2').removeClass("active"); $('.level-two-li-link').removeClass('active') $('.level-two-li-link').find('.wap-item-list3').removeClass("active") $('.nav-mob-btns').hide() $('.nav-ul-mob').addClass('active'); }) // 点击一级展开二级导航 $('.level-one-li .arrow-dw01').on('click', function () { var _index = $(this).index(); $(this).parent().toggleClass("active"); $(this).parent().siblings().removeClass('active'); $(this).parent().siblings().find('.wap-item-list2').removeClass("active") $(this).parent().find('.wap-item-list2').toggleClass("active"); return false; }) // 移动端点击二级展开三级导航 $('.level-two-li-link').on('click', function () { $(this).toggleClass("active"); $(this).siblings().removeClass('active'); $(this).siblings().find('.wap-item-list3').removeClass("active") $(this).find('.wap-item-list3').toggleClass("active"); }) } //学习与技术支持 var learn // 鼠标经过header标签后展开导航事件 // ---------20220909 头部导航动画 var $nav = $('.header-new.on .nav-new .nav-ul-mob .wap-first .e-cistern-l .wap-one-ul'), $underline = $('.underline'), $init; $nav.on('mouseover', 'li', function (e) { // 20220909 开始 var _navOffsetLeft = $nav.offset().left, _targetOffsetLeft = $(this).offset().left, _targetWidth = $(this).width(), _index = $(this).index(); $underline.css({ 'left': _targetOffsetLeft - _navOffsetLeft + 'px', 'width': _targetWidth + 'px' }); // 20220909 结束 // 禁止事件冒泡 e.stopPropagation(); // 判断导航是否定位到顶部 if ($('.e-module-202209210900 .header-new').hasClass('fixed')) { // 导航栏定位到顶部 var headH = $('.e-module-202209210900').height(); $('.e-module-202209210900 .header-new.on .main-header .nav-new .nav-ul-mob .wap-two').css('top', headH); } else { // 导航栏没定位 var headH = $('.e-module-202209210900').height(); var headT = $('.e-module-202209210900').offset().top; var scrollTop = $(window).scrollTop(); $('.e-module-202209210900 .header-new.on .main-header .nav-new .nav-ul-mob .wap-two').css('top', headH + headT - scrollTop); } // 20221009学习与技术白色背景高度 var tabHleran = 0; var rgBox = $('.header-new.on .main-header .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item.two .wap-item-list1 .level-one-li .wap-item-list2 .level-two-li .wap-item-list3') setTimeout(function () { $('.wap-item.two .wap-item-list1 .level-one-li:first-child .wap-item-list2 li').each(function () { tabHleran += $(this).outerHeight(); }) rgBox.css('height', tabHleran) }, 150) $(this).addClass('active').siblings().removeClass('active'); var index = _index + 1; // 禁止滚动 unScroll() disable_scroll() $init = setTimeout(function () { $('.level-two-li1:first-child').find('.wap-item-list3').addClass('active'); $('.level-two-li1:first-child').siblings().find('.wap-item-list3').removeClass('active'); $('.level-two-li2:first-child').find('.wap-item-list3').addClass('active'); $('.level-two-li2:first-child').siblings().find('.wap-item-list3').removeClass('active'); $('.header-new.on .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1 .level-one-li .wap-item-list2 ').eq(0).find('.level-two-li:first-child').addClass('active').siblings().removeClass('active'); $('.header-new.on .nav-new .nav-ul-mob .wap-two .wap-con .e-cistern-l .wap-item-con .wap-item .wap-item-list1.two .level-one-li').eq(3).find('.level-two-li:first-child').addClass('active').siblings().removeClass('active'); $('.wap-first').addClass('active'); $('.newpcbg').show(); $('.wap-two').slideDown(); $('.wap-two .wap-con').eq(_index).addClass('active').siblings().removeClass('active'); $('.wap-two .wap-con').eq(_index).find('.nav-mob-btns').show(); $('.wap-two .wap-con').on('mouseover', function (e) { disable_scroll() $('.header-new.on .nav-new .nav-ul-mob .wap-first .e-cistern-l .wap-one-ul li').eq(_index).addClass('active').siblings().removeClass('active'); $underline.css({ 'left': _targetOffsetLeft - _navOffsetLeft + 'px', 'width': _targetWidth + 'px' }); e.stopPropagation(); }) // 获取左边的高度,赋值给右边内容框 box1TabConH(_index); box1TabConH01(); }, 100) }) // 鼠标移出 $nav.on('mouseout', 'li', function (e) { clearTimeout($init) $('.header-new.on .nav-new .nav-ul-mob .wap-first .e-cistern-l .wap-one-ul li').removeClass('active'); var _navOffsetLeft = $nav.offset().left, _targetOffsetLeft = $(this).offset().left, _targetWidth = $(this).width(); $(this).removeClass('active'); $underline.css({ 'width': '0px' }); }) // 鼠标移除header标签后展开导航事件 $('body').on('mouseover', function () { $('.header-new.on .nav-new .nav-ul-mob .wap-first .e-cistern-l .wap-one-ul li').removeClass('active'); $underline.css({ 'width': '0' }); var _index = $(this).index(); $('.newpcbg').fadeOut(); $('.header-new.on .nav-new .nav-ul-mob .wap-two').slideUp(); // 启动滚动条 $('body').removeClass('body-fixed'); removeUnScroll() enable_scroll() }) $('body').on('mouseleave', function (e) { // 禁止事件冒泡 e.stopPropagation(); $('.newpcbg').fadeOut(); $('.header-new.on .nav-new .nav-ul-mob .wap-two').slideUp(); removeUnScroll() enable_scroll() }) //禁止滚动条滚动 function unScroll() { var top = $(document).scrollTop(); $(document).on('scroll.unable', function (e) { $(document).scrollTop(top); }) } //移除禁止滚动条滚动 function removeUnScroll() { $(document).unbind("scroll.unable"); } // 产品解决方案下面的产品板块的初始化 $('.box1-tab:first-child').addClass('active'); $('.box1-tab-cons .box1-tab-con').eq(0).addClass('active'); // 产品解决方案自动获取高度 function box1TabConH(_index) { // 获取左边的高度,赋值给右边内容框 var tabH = 0; var tabConBthH = $('.wap-item-list1.one .wap-item-list2 .level-two-li').eq(_index).find('.e-link-box').outerHeight(); $('.level-two-li1').each(function () { tabH += $(this).outerHeight(); }) $('.wap-item-list1.one .wap-item-list3 .wap-item-list3-con').css('maxHeight', tabH - tabConBthH) } // 学习与技术支持自动获取高度 function box1TabConH01() { // 获取左边的高度,赋值给右边内容框 var tabH = 0; var tabConBthH = $('.level-two-li2').eq(0).find('.e-link-box').outerHeight(); $('.wap-item.two .wap-item-list1 .level-one-li:first-child .wap-item-list2 li').each(function () { tabH += $(this).outerHeight(); }) $('.wap-item-list1.two .wap-item-list3 .wap-item-list3-con2').css('maxHeight', tabH - tabConBthH) } $('.box2-tab:first-child').addClass('active') $('.box2-tab-cons .box2-tab-con').eq(0).addClass('active'); //行业支持tab切换 $('.box2-tab').on('click', function () { var _index = $(this).index(); $(this).addClass('active').siblings().removeClass('active'); $('.box2-tab-cons .box2-tab-con').eq(_index).addClass('active').siblings().removeClass('active'); }) var speed = 200; //企业业务网站 $('.hea-btn1').on('click', function () { $('.e-module-202208180950').show() $(".top-nav-content").show() $(".top-nav-content").find(".worldwide-contact").slideUp(speed); $(".top-nav-content").find(".web-contact").slideDown(speed); }) //选择区域/语言 $('.hea-btn2').on('click', function () { $('.e-module-202208180950').show() $(".top-nav-content").show() $(".top-nav-content").find(".web-contact").slideUp(speed); $(".top-nav-content").find(".worldwide-contact").slideDown(speed) }) var keys = [37, 38, 39, 40]; function preventDefault(e) { e = e || window.event; if (e.preventDefault) e.preventDefault(); e.returnValue = false; } function keydown(e) { for (var i = keys.length; i--;) { if (e.keyCode === keys[i]) { preventDefault(e); return; } } } function wheel(e) { preventDefault(e); } function disable_scroll() { if (window.addEventListener) { window.addEventListener('DOMMouseScroll', wheel, false); } window.onmousewheel = document.onmousewheel = wheel; document.onkeydown = keydown; } function enable_scroll() { if (window.removeEventListener) { window.removeEventListener('DOMMouseScroll', wheel, false); } window.onmousewheel = document.onmousewheel = document.onkeydown = null; } } if ($('.e-module-202208161027').length > 0) { function module202208161027Fun($target) { var module202208161027Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.h400TextObj = this.moduleObj.hasClass('h400Text'); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); // resize初始化 this.saveAClass(); // 如果移动端设置了文字在图片下面,保存按钮颜色 this.setWapBtnColor(); // 如果移动端设置了文字在图片下面,设置按钮颜色为黑色 this.judgmentSwiper(); // 判断需不需要执行swiper,如果只有一个就不需要执行。多个就需要执行 this.scrollEvent(); // 设置滚动事件,文字动画效果 this.resizeEvent(); // 设置自适应 this.lazyVideoLink(); // 视频是否加载 this.lazyPicLink(); // 视频是否图片 }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); // 获取位置 this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, saveAClass: function () { var _this = this; if (_this.h400TextObj) { _this.aClassArr = []; $target.find('a').each(function () { _this.aClassArr.push($(this).attr('class')); }) } }, setWapBtnColor: function () { var _this = this; // 不管pc端按钮是什么颜色,到了移动端都是黑色按钮 if (_this.h400TextObj) { if (_this.winw < 920) { $target.find('.e-btn-bd-white-xl').addClass('e-btn-bd-black-xl').removeClass('e-btn-bd-white-xl'); $target.find('.e-btn-bd-white-lg').addClass('e-btn-bd-black-lg').removeClass('e-btn-bd-white-lg'); $target.find('.e-btn-bd-white-video-xl').addClass('e-btn-bd-black-video-xl').removeClass('e-btn-bd-white-video-xl'); $target.find('.e-btn-bd-white-video-lg').addClass('e-btn-bd-black-video-lg').removeClass('e-btn-bd-white-video-lg'); $target.find('.e-btn-bd-red-xl').addClass('e-btn-bd-black-xl').removeClass('e-btn-bd-red-xl'); $target.find('.e-btn-bd-red-lg').addClass('e-btn-bd-black-lg').removeClass('e-btn-bd-red-lg'); $target.find('.e-btn-bd-red-video-xl').addClass('e-btn-bd-black-video-xl').removeClass('e-btn-bd-red-video-xl'); $target.find('.e-btn-bd-red-video-lg').addClass('e-btn-bd-black-video-lg').removeClass('e-btn-bd-red-video-lg'); } else { $target.find('a').each(function (index, elm) { $(this).attr('class', _this.aClassArr[index]); }) } } }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; } this.moduleObj.data("swiper-init", true); this.initSwiper(); } }, lazyPicLink: function () { // 加载图片 if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { // 当滚动条滚动到当前位置时,加载视频 this.addPicLink(); } }, lazyVideoLink: function () { // 加载视频 if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { // 当滚动条滚动到当前位置时,加载视频 this.addVideoLink(); } }, addPicLink: function () { this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); var src = $this.find('img').attr("data-original"); if ($this.find(".e-bg").css("backgroundImage") != "url(" + src + ")") { $this.find(".e-bg").css("backgroundImage", "url('" + src + "')"); $this.find(".e-lazy").css("display", "none"); } }) }, addVideoLink: function () { if (this.winw > 1200) { this.moduleSlideObj = $target.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); if ($this.find(".e-bg").data('src') != '' && $this.find('.video').length == 0) { // 添加video的dom结构 $this.find(".e-bg").append(""); // 判断视频是否已经赋值,如果赋值了,就不需要再次赋值了。 $this.find('.video').attr("src", $this.find(".e-bg").data('src')); } }) } else { $target.find('.video').remove(); } }, initSwiper: function () { var _this = this; var slideLength = $target.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper-container"), { pagination: { // 设置点点点 el: $target.find('.swiper-pagination'), clickable: true }, grabCursor: slideLength > 1 ? true : false, autoplay: $target.data("auto-time") ? { delay: $target.data("auto-time"), stopOnLastSlide: false, disableOnInteraction: true } : false, loop: slideLength > 1 ? true : false, // 设置自动轮播 noSwiping: slideLength > 1 ? false : true, runCallbacksOnInit: true, on: { init: function () { $target.find(".swiper-pagination").show(); }, slideChangeTransitionEnd: function () { _this.activeIndex = this.activeIndex; setTimeout(function () { // 根据文字颜色变化底部点点点的颜色 var $currentSilde = $target.find(".swiper-slide-active"); var $pr = $currentSilde.parent(); if ($currentSilde.hasClass('isBlackFont')) { $pr.next('.swiper-pagination').addClass('gray'); } else { $pr.next('.swiper-pagination').removeClass('gray'); } }, 0) }, resize: function () { var _this = this; setTimeout(function () { _this.update(); //窗口变化时,更新Swiper的一些属性,如宽高等 _this.emit('slideChangeTransitionEnd'); }, 250) }, } }); //鼠标覆盖停止自动切换 mySwiper.el.onmouseover = function () { mySwiper.autoplay.stop(); } //鼠标离开开始自动切换 mySwiper.el.onmouseout = function () { mySwiper.autoplay.start(); } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202208161027', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyVideoLink(); // 视频是否加载 _this.lazyPicLink(); // 视频是否图片 }); }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202208161027', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); // resize初始化 _this.setWapBtnColor(); // 设置按钮颜色 _this.scrollEvent(); // 设置滚动事件,文字动画效果 }, 200) } }) } }; module202208161027Obj.init(); } // 初始化 $('.e-module-202208161027').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208161027Fun($(this)); }) } if ($('.e-module-202208091539').length > 0) { function module202208091539Fun($target) { var module202208091539Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.fixedBoxObj = this.moduleObj.find('.fixed-box'); this.liObj = this.moduleObj.find("li"); this.headObj = $('.e-module-202209210900 .header-new'); this.anchorPointObj = $('.anchorpoint'); this.perScrollTop = 0; this.scrollLock = false; //区分是鼠标滚动还是自动滚动 this.resizeInit(); this.highlightNav(); this.clickEvent(); this.scrollEvent(); this.mouseEvent(); this.anchor(); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); // 获取位置 this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; this.docH = $(document).height(); if (this.winw > 1200) { this.moduleObj.find('.anchor').show(); } else { this.moduleObj.find('.anchor').hide(); } }, anchor: function () { var queryStr = getQueryString("section"); if (queryStr == undefined) return // 清除滚动条默认位置 if ('scrollRestoration' in history) { history.scrollRestoration = 'manual'; } this.liObj.each(function () { var _this = $(this); if (_this.data('key') == queryStr) { setTimeout(function () { _this.trigger('click'); }, 500) } }) // 获取链接参数 function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); } }, highlightNav: function () { var _this = this; // 高亮显示当前导航 var perLightHighIndex = -2; var anchorpointArr = []; _this.anchorPointObj.each(function () { //已经到达内容的一半的距离 anchorpointArr.push($(this).offset().top + $(this).height()); }) var anchorLen = anchorpointArr.length; for (var i = 0; i < anchorLen; i++) { if (_this.scrollTop <= anchorpointArr[i]) { //高亮发生改变 if (perLightHighIndex != i) { _this.liObj.eq(i).addClass('active').siblings().removeClass('active'); perLightHighIndex = i; _this.moduleObj.find('.wap-title').text(this.liObj.eq(i).text()); } break; } } // 滚动时移动端title显示当前板块 if (_this.winw < 1200) { var $titleObj = _this.moduleObj.find('.wap-title'); if (_this.liObj.eq(perLightHighIndex).text() != '') { $titleObj.text(_this.liObj.eq(perLightHighIndex).text()); } } }, mouseEvent: function () { $(".e-module-202208091539 .anchor").on("mousedown.202208091539", function (e) { var _this = $(".e-module-202208091539 .anchor"); var off = true; var curNum = 0; var scrollX = 0; $("body").on("mousemove.202208091539", function (e1) { var moveX = e1.clientX; // 判断是点击还是滚动,如果点击后鼠标滑动超过10px,我判断为鼠标滑动 if (off) { off = false; curNum = moveX; scrollX = _this.find('.sl').scrollLeft(); } //移动时的坐标减去落入时的坐标 var x = moveX - curNum; _this.find('.sl').scrollLeft(scrollX - x); }); //mouseup事件,关闭当前mousemove事件,并将定时置空 $("body").on("mouseup", function (e) { $("body").off("mousemove.202208091539"); }) }) }, clickEvent: function () { var _this = this; var clickiTime = 0; _this.liObj.on('click', function (e) { // 阻止时间冒泡 e.stopPropagation(); scrollLock = true; var li_index = $(this).index(); var head_h = _this.headObj.height(); var anchor_point_t = []; _this.anchorPointObj.each(function () { anchor_point_t.push($(this).offset().top - 70); }); var willScrollTop = anchor_point_t[li_index]; $("body,html").stop(true, true).animate({ "scrollTop": willScrollTop }); _this.headObj.clearQueue().animate({ 'top': -head_h }, 300, function () { // 高亮 _this.liObj.eq(li_index).addClass('active').siblings().removeClass('active'); var $titleObj = _this.moduleObj.find('.wap-title'); $titleObj.text(_this.liObj.eq(li_index).text()); clearTimeout(clickiTime); clickiTime = setTimeout(function () { _this.perScrollTop = _this.win.scrollTop(); scrollLock = false; }, 150) }); _this.fixedBoxObj.css({ 'position': 'fixed', }).clearQueue().animate({ 'top': 0 }, 300).parents('.e-module-202208091539').addClass('fixed'); // 移动端 if (_this.winw < 1200) { if (!_this.moduleObj.find('.anchor').is(':hidden')) { _this.moduleObj.find('.anchor').slideToggle(); } } if (_this.winw < 1200) { _this.moduleObj.find('.wap-line').toggleClass("wap-another"); } }) //移动端点击显示二级导航栏的标题,展开定位下拉 $('.e-module-202208091539 .wap-controller').on('click', function (e) { if (_this.winw < 1200) { // 阻止时间冒泡 e.stopPropagation(); $(this).nextAll('.anchor').slideToggle(); $(this).children('.wap-line').toggleClass("wap-another") } }) // 移动端点击body,如果定位导航展开,需要收起 $('body').on('click', function () { if (_this.winw < 1200) { if (!_this.moduleObj.find('.anchor').is(':hidden')) { _this.moduleObj.find('.anchor').slideToggle(); } } }) }, scrollEvent: function () { var _this = this; var timer = 0; _this.win.on('scroll.202208091539', function () { if (_this.scrollLock) { return } clearTimeout(timer); timer = setTimeout(function () { _this.scrollTop = _this.win.scrollTop(); var head_h = _this.headObj.height() + 1; var moduleTop = _this.moduleObj.offset().top - _this.moduleObj.height(); _this.docH = $(document).height(); var winh = _this.winh * 1.5; // 判断滚动条是往上还是往下滚动 if (_this.scrollTop - _this.perScrollTop >= 3) { //向下 // 判断滚动条滚动到什么位置 if (_this.scrollTop + head_h > moduleTop && _this.scrollTop < (_this.docH - winh)) { //顶部交界处 // 计算滚动条移动的位置 _this.headObj.clearQueue().animate({ 'top': -head_h }, 300); _this.fixedBoxObj.css({ 'position': 'fixed' }).clearQueue().animate({ 'top': 0 }, 300).parents('.e-module-202208091539').addClass('fixed'); } else if ((_this.docH - _this.scrollTop) <= winh) { //底部交界处 _this.headObj.clearQueue().animate({ 'top': 0 }, 300); _this.fixedBoxObj.css({ 'position': 'fixed', }).clearQueue().animate({ 'top': head_h }, 300).parents('.e-module-202208091539').addClass('fixed'); } } else if (_this.scrollTop - _this.perScrollTop <= -3) { //向上 // 判断滚动条滚动到什么位置 if (_this.scrollTop - head_h - _this.moduleObj.height() < moduleTop) { //顶部交界处 // 计算滚动条移动的位置 _this.headObj.clearQueue().animate({ 'top': 0 }, 300); _this.fixedBoxObj.stop(true).css({ 'position': 'absolute', 'top': '-50px' }).parents('.e-module-202208091539').removeClass('fixed'); } else if ((_this.docH - _this.scrollTop) >= winh) { //底部交界处 _this.headObj.clearQueue().animate({ 'top': 0 }, 300); _this.fixedBoxObj.css({ 'position': 'fixed', }).clearQueue().animate({ 'top': head_h }, 300).parents('.e-module-202208091539').addClass('fixed'); } } _this.highlightNav(); _this.perScrollTop = _this.scrollTop; }, 0) }) }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202208091539', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); }, 100) } }) } }; module202208091539Obj.init(); } // 初始化 $('.e-module-202208091539').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208091539Fun($(this)); }) } if ($('.e-module-202208160923').length > 0) { function module202208160923Fun($target) { var module202208160923Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.slideItem3Obj = this.moduleObj.find(".slide-item3"); this.slideItem2Obj = this.moduleObj.find(".slide-item2"); this.closeBtnObj = this.moduleObj.find(".close-btn"); this.tellConMobObj = this.moduleObj.find(".tell-con-mob"); this.resizeInit(); this.clickEvent(); this.scrollEvent(); }, resizeInit: function () { this.winw = this.win.width(); // 获取位置 this.scrollTop = this.win.scrollTop(); }, clickEvent: function () { var _this = this; // 点击top按钮,页面回到顶部 _this.slideItem3Obj.on('click', function () { $("html, body").animate({ scrollTop: 0 }); }) // 移动端点击电话icon,弹框显示 _this.slideItem2Obj.on('click', function () { if (_this.winw < 1200) { _this.tellConMobObj.show(); } }) // 点击弹框的xx按钮,关闭弹框 _this.closeBtnObj.on('click', function () { if (_this.winw < 1200) { _this.tellConMobObj.hide(); } }) }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202208160923', function () { // 获取位置 _this.scrollTop = _this.win.scrollTop(); // 三元表达式进行高度判断 if (_this.winw > 1200) { _this.scrollTop >= 700 ? _this.slideItem3Obj.fadeIn() : _this.slideItem3Obj.fadeOut(); } }); } }; module202208160923Obj.init(); } // 初始化 $('.e-module-202208160923').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208160923Fun($(this)); }) } if ($('.e-module-202208171450').length > 0) { function module202208171450Fun($target) { var module202208171450Obj = { init: function () { // 获取属性 this.win = $(window); this.moduleObj = $target; this.moduleSlideObj = $target.find(".swiper-slide"); this.resizeInit(); this.clickEvent(); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); }, clickEvent: function () { var _this = this; _this.moduleObj.find(".link-set>ul").find("li:first").on("click", function () { if (_this.winw < 1200) { $(this).parent().toggleClass("active").find('li').toggleClass("active"); } }) }, resizeEvent: function () { // 页面resize事件 var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202208171450', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; // 删除之前的定时器 if (resizeTimer) { clearTimeout(resizeTimer); } // 添加新的定时器 resizeTimer = setTimeout(function () { _this.resizeInit(); }, 100) } }) } }; module202208171450Obj.init(); } // 初始化 $('.e-module-202208171450').each(function () { // 防止js文件被执行2次。 var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202208171450Fun($(this)); }) }