网站
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.

noticeDetail.js 1.4 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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(news + '/' + 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. $("#newTitle").html(content.title);
  36. $("#newTime").html('发布时间:'+content.newsTime);
  37. $("#newCome").html('来源:'+content.createBy);
  38. $("#newContent").html(content.content);
  39. }
  40. }
  41. goDetail = function(id){
  42. tools.skip('/agriculturalLawEnforcement/view/workDynamics/workDetail.html?id='+id);
  43. }
  44. return module;
  45. });