$(function () { // $(".header_root").load("./comm/header.html"); $(".footer_root").load("./comm/footer.html"); // nav传值显示下划线 // $(".header_root").data("nav_info", 2); // 6.5.1 中文列表 学校图标 var school_logo = [], html_logo = "", html_data = ""; school_data = []; $.ajax({ type: "POST", url: $.baseUrl + "/sl/listc", dataType: "json", async: false, contentType: "application/json; charset=utf-8", success: function (data) { if (data.code === 0) { school_logo = data.obj; $.each(school_logo, (idx, item) => { html_logo += `
${item.schoolname}
`; }); $(".ser_school").html(html_logo); } else { alert(data.msg); } } }); //5.5.1 中文列表 服务数据 $.ajax({ type: "POST", url: $.baseUrl + "/sc/listc", dataType: "json", data: JSON.stringify({ size: 30 }), async: false, contentType: "application/json; charset=utf-8", success: function (data) { if (data.code === 0) { school_data = data.obj; school_data = school_data.concat(data.obj); $.each(school_data, (idx, item) => { html_data += `
${item.scname}
`; }); $(".swiper-wrapper").html(html_data); } else { alert(data.msg); } } }); var serSwiper = new Swiper(".ser_swiper_container.swiper-container", { slidesPerView: 3, loop: true, autoplay: 3000 }); });