Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

166 rader
5.0 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/title_search.css">
  9. <link rel="stylesheet" href="../Content/phone/css/menu.css">
  10. <link rel="stylesheet" href="../Content/phone/css/split.css">
  11. <style>
  12. * {
  13. margin: 0;
  14. padding: 0;
  15. }
  16. .total {
  17. padding: 17px 2.6%;
  18. font-size: 12px;
  19. color: #AEAEAE;
  20. border-bottom: 1px solid #F8F8F8;
  21. }
  22. .total span {
  23. color: #0064D6;
  24. font-size: 16px;
  25. margin: 0 8px;
  26. }
  27. .list {
  28. padding: 10px 2.6%;
  29. color: #282828;
  30. font-size: 14px;
  31. border-bottom: 1px solid #F8F8F8;
  32. display: block;
  33. /* text-indent: none; */
  34. text-decoration: none;
  35. }
  36. .list > div:first-child {
  37. margin-bottom: 5px;
  38. display: flex;
  39. width: calc(100% - 10px);
  40. align-items: center;
  41. }
  42. .list > div:first-child > div:first-child {
  43. margin-right: 10px;
  44. white-space: nowrap;
  45. text-overflow: ellipsis;
  46. overflow: hidden;
  47. word-break: break-all;
  48. }
  49. .list > div:first-child > div:last-child {
  50. display: flex;
  51. align-items: center;
  52. width: 60px;
  53. }
  54. .time {
  55. color: #AEAEAE;
  56. font-size: 12px;
  57. text-align: right;
  58. }
  59. .newCss {
  60. width: 30px;
  61. }
  62. </style>
  63. </head>
  64. <div class="title_search">
  65. <div style="width: 46.4%;">
  66. <img src="../Content/phone/imgs/newStudentGui/title.png" alt="" width="100%">
  67. </div>
  68. <div>
  69. <input type="text" id="search" placeholder="新闻搜索..." />
  70. <img src="../Content/phone/imgs/search_icon.png" alt="" id="search_icon">
  71. </div>
  72. </div>
  73. <div class="menu">
  74. <a href="index.html">
  75. <img src="../Content/phone/imgs/backBtn.png" alt="" width="100%">
  76. </a>
  77. <div>学校新闻</div>
  78. </div>
  79. <div class="split"></div>
  80. <div class="total">
  81. 共有<span id="totalCount"></span>条新闻资讯
  82. </div>
  83. <div id="content">
  84. <!--<a class="list" href="schoolNewsDetails.html">
  85. <div>
  86. <div>
  87. 学校召开专业建设规划研讨会学校召开专业建设规划研讨会学校召开专业建设规划研讨会
  88. </div>
  89. <div>
  90. <img src="../Content/phone/imgs/new_icon.png" alt="" class="newCss">
  91. </div>
  92. </div>
  93. <div class="time">2021-03-29</div>
  94. </a>
  95. <a class="list" href="schoolNewsDetails.html">
  96. <div>
  97. <div>
  98. 学校召开专业建设规划研讨会
  99. </div>
  100. <div>
  101. <img src="../Content/phone/imgs/new_icon.png" alt="" class="newCss">
  102. </div>
  103. </div>
  104. <div class="time">2021-03-29</div>
  105. </a>-->
  106. </div>
  107. <script src="../Content/phone/js/jquery.min.js"></script>
  108. <script src="../Content/phone/js/getSize.js" type="text/javascript" charset="utf-8"></script>
  109. <script src="../Content/phone/js/menu.js" type="text/javascript" charset="utf-8"></script>
  110. <script src="../Content/phone/js/title_search.js" type="text/javascript" charset="utf-8"></script>
  111. <script src="server.js"></script>
  112. <script type="text/javascript">
  113. $(function () {
  114. GetNews();
  115. });
  116. //获取学校新闻
  117. function GetNews() {
  118. $.ajax({
  119. url: serverurl + '/arrangelesson/GetSchoolNewList?categoryId=0',
  120. type: "GET",
  121. dataType: "json",
  122. async: true,
  123. cache: false,
  124. success: function (data) {
  125. var data = data.data;
  126. $('#totalCount').html(data.length);
  127. var html = '';
  128. for (var i = 0; i < data.length; i++) {
  129. html += '<a class="list" href="schoolNewsDetails.html?type=1&Id=' + data[i].F_NewsId+'">';
  130. html += '<div>';
  131. html += '<div>' + data[i].F_FullHead +'</div>';
  132. //html += '<div>';
  133. //html += '<img src="../Content/phone/imgs/new_icon.png" alt="" class="newCss">';
  134. //html += '</div>';
  135. html += '</div>';
  136. html += '<div class="time">' + data[i].F_ReleaseTime + '</div>';
  137. html += '</a>';
  138. }
  139. $('#content').html(html);
  140. },
  141. error: function (XMLHttpRequest, textStatus, errorThrown) {
  142. },
  143. beforeSend: function () {
  144. },
  145. complete: function () {
  146. }
  147. });
  148. }
  149. </script>
  150. <body>
  151. </body>
  152. </html>