星火官网,前端页面(前台)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

service.js 1.4KB

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