let html = []; $(".navigation>ul>li").hover(function() { $(this).addClass("on").siblings().removeClass("on") // clearTouch("body", "hidden") }, function() {}) // $("li.navigation-product").hover(function() { getCatesPoter(".navigation-product", 1) if ($(this).find(".navfix").length > 0) { $(".navfix-bg").addClass("navfix-bg-active") } $(this).find(".navfix-center").removeClass('navfix-center-active'); $(this).find(".navfix-right").removeClass('navfix-right-active'); $(this).children(".navfix").stop().slideDown() $(this).siblings().children(".navfix").stop().slideUp(); // clearTouch("body", "hidden") }, function() { $(".navfix-bg").removeClass("navfix-bg-active") $(this).children(".navfix").stop().slideUp() // clearTouch("body", "auto"); }) // $("li.navigation-product .navfix-cates li.navfix-product-id").hover(function(e) { e.stopPropagation(); let ids = $(this).find('h3').attr("data-id"); getCatesSubnav(ids); getCatesPoter(".navigation-product", ids); }, function() { }) // $("li.navigation-product .navfix-cates li.navfix-solution-id").hover(function(e) { e.stopPropagation(); let ids = $(this).find('h3').attr("data-id"); $(this).find(".navfix-right").removeClass('navfix-right-active'); $(this).find(".navfix-center").removeClass('navfix-center-active'); getCatesPoter(".navigation-product", ids) }, function() { }) // $("li.navigation-solution").hover(function(e) { getCatesPoter($(this), 2) if ($(this).find(".navfix").length > 0) { $(".navfix-bg").addClass("navfix-bg-active") } $(this).addClass("on").siblings().removeClass("on") $(this).children(".navfix").stop().slideDown() $(this).siblings().children(".navfix").stop().slideUp(); // clearTouch("body", "hidden") }, function() { $(".navfix-bg").removeClass("navfix-bg-active") $(this).children(".navfix").stop().slideUp() // clearTouch("body", "auto"); }) // $("li.navigation-solution .navfix-cates li.navfix-solution-id").hover(function(e) { e.stopPropagation(); let ids = $(this).find('h3').attr("data-id"); $(this).find(".navfix-right").removeClass('navfix-right-active'); getCatesPoter("li.navigation-solution", ids) }, function() { }) // 获二级菜单 function getCatesSubnav(param) { // console.log(param) if (!param) { return false; } let url = '/api.php/cms/nav/scode/' + param $.ajax({ type: 'POST', url: url, dataType: 'json', data: siteKeys, success: function(response, status) { html = []; if (response.code) { response = response.data // 判断子菜单 if (response.length > 0) { $(".navigation-product").find(".navfix-center .navfix-menus").html(''); $(".navigation-product").find(".navfix-center").addClass('navfix-center-active'); $(".navigation-product").find(".navfix-right").addClass('navfix-right-active'); html += "