Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

118 řádky
3.2 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport"
  6. content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
  7. <title>学校新闻</title>
  8. <link rel="stylesheet" href="../Content/phone/css/menu.css">
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. }
  14. .menu {
  15. background-color: #0064D6;
  16. }
  17. .main_title {
  18. color: #282828;
  19. font-size: 17px;
  20. font-weight: bold;
  21. }
  22. .main_time {
  23. color: #9A9A9A;
  24. font-size: 12px;
  25. text-align: right;
  26. }
  27. .main_content {
  28. color: #5E5E5E;
  29. font-size: 14px;
  30. }
  31. .main {
  32. padding: 0px 20px;
  33. margin: 30px 0 10px;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <div class="menu">
  39. <a href="javascript:history.back();">
  40. <img src="../Content/phone/imgs/backBtn_white.png" alt="" width="100%">
  41. </a>
  42. <div style="color: #FFFFFF;font-weight: bold;" id="title">学校新闻</div>
  43. </div>
  44. <div class="main">
  45. <div class="main_title">
  46. </div>
  47. <div class="main_time">
  48. </div>
  49. <div class="main_content" style="margin-top: 10px;" id="main_content">
  50. </div>
  51. </div>
  52. <script src="../Content/phone/js/jquery.min.js"></script>
  53. <script src="../Content/phone/js/getSize.js"></script>
  54. <script src="../Content/phone/js/menu.js"></script>
  55. <script src="server.js"></script>
  56. <script type="text/javascript">
  57. //type: 1学校新闻,2校园风光,3 专业介绍
  58. var type = getQueryString('type');
  59. var Id = getQueryString('Id');
  60. $(function () {
  61. GetDetails();
  62. });
  63. //获取详情
  64. function GetDetails() {
  65. console.log(type + "," + Id);
  66. $.ajax({
  67. url: serverurl + '/arrangelesson/GetSchoolNewsDetails?type=' + type + '&Id=' + Id,
  68. type: "GET",
  69. dataType: "json",
  70. async: true,
  71. cache: false,
  72. success: function (data) {
  73. var data = data.data;
  74. var title = "";
  75. if (type == '1') {
  76. title = '学校新闻';
  77. } else if (type == '2') {
  78. title = '校园风光';
  79. }
  80. else if (type == '3') {
  81. title = '专业介绍';
  82. }
  83. $('#title').html(title);
  84. $('.main_title').html(data.title);
  85. $('.main_time').html(data.time);
  86. //$('.main_content').innerHTML(data.desc);
  87. document.getElementById('main_content').innerHTML = data.desc;
  88. },
  89. error: function (XMLHttpRequest, textStatus, errorThrown) {
  90. },
  91. beforeSend: function () {
  92. },
  93. complete: function () {
  94. }
  95. });
  96. }
  97. function getQueryString(name){
  98. var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
  99. var r = window.location.search.substr(1).match(reg);
  100. if(r!=null)return unescape(r[2]); return null;
  101. }
  102. </script>
  103. </body>
  104. </html>