(() => { $.ajax({ url: api + "/open/listNews", data: {}, type: "GET", dataType: "json", success: function (e) { if (e.error && e.error.length) alert("数据加载失败,请刷新页面"); else { var t = ""; if (e.data.list.length) { for (var j = 0; j < e.data.list.length; j++) { var i = e.data.list[j], num = j + 1; t += "
" + num + "" + i.title + "
" } } else t = "

暂无新闻动态

", $(".page_ctrl").css({ display: "none" }); $(".hlist").html(t) } } }) })(); (() => { $(".kw").click(function () { var keywords = $(this).html() window.sessionStorage.setItem("keyword", keywords) window.location.href = window.location.protocol + '//' + window.location.host + "/news" }) })();