网站
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

51 строка
1.5 KiB

  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'',
  10. //焦点图数据
  11. focusList: [],
  12. communicateList: [],
  13. },
  14. };
  15. var tools = new Tools();
  16. module.init = function (page) {
  17. //新闻管理列表
  18. tools.doGet(schemeDetail + '/' + getQueryVariable('id'), {}, module.newList , true);
  19. };
  20. //获取地址栏参数
  21. function getQueryVariable(variable){
  22. var query = window.location.search.substring(1);
  23. var vars = query.split("&");
  24. for (var i=0;i<vars.length;i++) {
  25. var pair = vars[i].split("=");
  26. if(pair[0] == variable){return pair[1];}
  27. }
  28. return(false);
  29. }
  30. //新闻列表
  31. module.newList = function (data) {
  32. console.log(data)
  33. if (data.code == 200) {
  34. var content = data.data;
  35. module.data.newList = content;
  36. var newData = template('newData', module.data);
  37. $("#newContent").html(newData);
  38. if (document.body.scrollHeight > document.body.offsetHeight){
  39. document.getElementById('bottomInformation').style.position = 'relative';
  40. }
  41. }
  42. }
  43. goDetail = function(id){
  44. tools.skip('/agriculturalLawEnforcement/view/workDynamics/workDetail.html?id='+id);
  45. }
  46. return module;
  47. });