星火官网,前端页面(前台)
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

service.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $(function () {
  2. // $(".header_root").load("./comm/header.html");
  3. $(".footer_root").load("./comm/footer.html");
  4. // nav传值显示下划线
  5. // $(".header_root").data("nav_info", 2);
  6. // 6.5.1 中文列表 学校图标
  7. var school_logo = [],
  8. html_logo = "",
  9. html_data = "";
  10. school_data = [];
  11. $.ajax({
  12. type: "POST",
  13. url: $.baseUrl + "/sl/listc",
  14. dataType: "json",
  15. async: false,
  16. contentType: "application/json; charset=utf-8",
  17. success: function (data) {
  18. if (data.code === 0) {
  19. school_logo = data.obj;
  20. $.each(school_logo, (idx, item) => {
  21. html_logo += ` <div class="ser_sc_info">
  22. <img src="${$.showImageUrl}${item.schoollogo}" />
  23. <div>${item.schoolname}</div>
  24. </div>`;
  25. });
  26. $(".ser_school").html(html_logo);
  27. } else {
  28. alert(data.msg);
  29. }
  30. }
  31. });
  32. //5.5.1 中文列表 服务数据
  33. $.ajax({
  34. type: "POST",
  35. url: $.baseUrl + "/sc/listc",
  36. dataType: "json",
  37. data: JSON.stringify({
  38. size: 30
  39. }),
  40. async: false,
  41. contentType: "application/json; charset=utf-8",
  42. success: function (data) {
  43. if (data.code === 0) {
  44. school_data = data.obj;
  45. school_data = school_data.concat(data.obj);
  46. $.each(school_data, (idx, item) => {
  47. html_data += ` <div class="swiper-slide ser_con">
  48. <img src="${$.showImageUrl}${item.scpic}" />
  49. <div>${item.scname}</div>
  50. </div>`;
  51. });
  52. $(".swiper-wrapper").html(html_data);
  53. } else {
  54. alert(data.msg);
  55. }
  56. }
  57. });
  58. var serSwiper = new Swiper(".ser_swiper_container.swiper-container", {
  59. slidesPerView: 3,
  60. loop: true,
  61. autoplay: 3000
  62. });
  63. });