$(function () { $(".search-submit").click(function (event) { $(this).removeAttr("name"); event.preventDefault(); var val = $.trim($(".search-title").val()); if (val !== "") { $(".wp-search").find("form").submit(); } else { alert("璇疯緭鍏ュ叧閿瘝"); } return false; }); $(".news .month").each(function(){ console.log($(this).text()) $(this).text(getEnmonth(parseInt($(this).text())) ) }) if(window.innerWidth<=767){ $(".foot-center .links:not(.contant)").click(function () { $(this).find(".con").slideToggle(); $(this).toggleClass("open"); }); } }); fontSize(); $(window).resize(function () { fontSize(); }); function fontSize() { var size; var winW = window.innerWidth; $("body").removeClass("mobile") if (winW <= 3800 && winW > 999) { size = Math.round(winW / 19.2); $(".wrapper .inner").css("zoom","1") } else if (winW <= 999) { $("body").addClass("mobile") $(".wrapper .inner").css("zoom","1") size = 65; if (winW <= 640) { $(".wrapper .inner").css("zoom","0.8") } } $('html').css({ 'font-size': size + 'px' }) $("a").each(function(){ $(this).attr("target","_self"); }) } function getEnmonth(month) { const monthList = ["涓€鏈?, "浜屾湀", "涓夋湀", "鍥涙湀", "浜旀湀", "鍏湀", "涓冩湀", "鍏湀", "涔濇湀", "鍗佹湀", "鍗佷竴鏈?, "鍗佷簩鏈?] return monthList[month-1] }