$(function () {
// 获取列表
function getHelpLlis() {
$.ajax({
url: "/console/v1/help",
method: "get",
success: function (res) {
res.data.list.forEach((item, index) => {
$("#docement-list").append(`
`);
if (item.helps.length !== 0) {
item.helps.slice(0, 6).forEach((helps) => {
$(`#document-item${item.id}`).append(`
${helps.title}
`);
});
}
});
},
});
}
getHelpLlis();
/* 文档搜索 */
$(".banner-document .search-btn").click(function () {
const val = $("#document-input").val();
location.href = `document-result.html?search=${val}`;
});
});