网站
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

67 satır
1.9 KiB

  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "echarts", 'swiper' , 'LeftNav'], function ($, template, Tools, echarts, swiper , LeftNav) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'',
  10. //焦点图数据
  11. focusList: [],
  12. communicateList: [],
  13. noticeList: [],
  14. policyList: [],
  15. newList: [],
  16. dataList:{
  17. children: [],
  18. haschildren: true,
  19. isopen: false,
  20. level: "0",
  21. name: "",
  22. url: "#",
  23. }
  24. },
  25. };
  26. var tools = new Tools();
  27. module.init = function (page) {
  28. //新闻管理列表
  29. tools.doGet(projectClassification, {}, module.projectList , true);
  30. tools.doPost(guideQuery, {}, module.guideQueryList , true);
  31. };
  32. //新闻列表
  33. module.projectList = function (data) {
  34. if (data.code == 200) {
  35. var content = data.data;
  36. content.forEach(res=>{
  37. module.data.dataList.children.push(res)
  38. })
  39. leftNav(".left",module.data.dataList);
  40. }
  41. }
  42. //新闻列表
  43. module.guideQueryList = function (data) {
  44. if (data.code == 200) {
  45. var content = data.data;
  46. module.data.directoriesList = content;
  47. var directoriesData = template('directoriesData', module.data);
  48. $("#directoriesContent").html(directoriesData);
  49. }
  50. }
  51. goSearch = function () {
  52. console.log($("#searchInput").val())
  53. tools.doPost(guideQuery, {projectTitle:$("#searchInput").val()}, module.guideQueryList , true);
  54. }
  55. searchType = function (id) {
  56. console.log(id)
  57. tools.doPost(guideQuery, {projectType:id}, module.guideQueryList , true);
  58. }
  59. return module;
  60. });