newDetail.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!DOCTYPE html
  2. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <link rel="shortcut icon" href="imgs/favicon.png" type="image/x-icon">
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>新闻详情</title>
  8. <link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" />
  9. <link rel="stylesheet" href="css/main.min.css">
  10. <link rel="stylesheet" href="css/style.css">
  11. <link rel="stylesheet" type="text/css" href="css/cc-css-tools.css" />
  12. <link rel="stylesheet" href="js/bootstrap-3.4.1-dist/css/bootstrap.min.css">
  13. <script src="js/jquery3.6.min.js"></script>
  14. <script src="js/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
  15. <script src="/js/rem.js"></script>
  16. <style type="text/css">
  17. .bannerbg {
  18. background: url(../images/bannerbg12.png) center center no-repeat;
  19. background-size: 100% 100%;
  20. }
  21. .m-text p {
  22. line-height: 30px;
  23. color: #646464;
  24. }
  25. a,a:hover {
  26. text-decoration: none !important;
  27. }
  28. .text-box p{
  29. text-indent:35px
  30. }
  31. .text-box img{
  32. margin: 10px auto;
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div class="navbgbox">
  38. <div class="navbg">
  39. <div class="nav about_nav">
  40. <div style="position: relative">
  41. <a href="index.html" class="nav_logo">
  42. <img src="images/dgt_logo.png" width="171" height="70">
  43. </a>
  44. <div class="guanggao">
  45. <strong style="color: #999999; margin-left : -140px; font-size: 14px">智慧科技 · 神州软件</strong>
  46. </div>
  47. </div>
  48. <div class="nav_a">
  49. <a href="index.html">首页</a>
  50. <a href="product.html">智慧企业</a>
  51. <a href="wisdom.html">智慧城市</a>
  52. <a href="fangan.html">解决方案</a>
  53. <a href="technology.html">技术服务</a>
  54. <a href="news.html" class="cur">新闻中心</a>
  55. <a href="about_us.html">关于我们</a>
  56. <a href="contact.html">联系我们</a>
  57. <!-- <img width="70px" src="imgs/QRcode1.jpg" alt=""> -->
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="banner">
  63. <div class="bannerbg">
  64. <div class="shade">
  65. <div class="cc-tc-w bannerBoxTitle">
  66. <div class="bannerTitle">新闻中心</div>
  67. <div class="bannerTitle-eng">News Center</div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="g-content--other">
  73. <div class="m-about">
  74. <div class="f-in">
  75. <div class="bnv">
  76. <a href="news.html">新闻中心</a> 》当前页
  77. </div>
  78. <div class="u-title bnvMargin">
  79. <h2 id="title"></h2>
  80. </div>
  81. <h4>
  82. <span>时间:</span>
  83. <span class="date"></span>
  84. </h4>
  85. <div class="m-text" id="content">
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="footerbg">
  91. <div style="height: auto;" class="footer">
  92. <div>
  93. <span><a href="index.html">首页</a>|</span><span><a href="product.html">智慧企业</a>|</span><span><a
  94. href="wisdom.html">智慧城市</a>|</span><span><a href="fangan.html">解决方案</a>|</span><span><a
  95. href="technology.html">技术服务</a>|</span><span><a href="news.html">新闻中心</a>|</span><span><a
  96. href="about_us.html">关于我们</a>|</span><span><a href="contact.html">联系我们</a></span>
  97. <p>
  98. <span>
  99. 上海市长宁区福泉路111号神州数码(上海)科技园 </span>
  100. <span>|</span>
  101. <span>北京市海淀区上地九街九号数码科技广场 </span>
  102. <span>|</span>
  103. <span>洛阳市洛龙区金城寨街正大国际中心</span>
  104. </p>
  105. <p style="padding-top: 5px;">
  106. <span>苏州市相城区元和街道嘉元路959号元和大厦 </span>
  107. <span>|</span>
  108. <span>杭州市下城区延安路385号杭州嘉里中心 </span>
  109. </p>
  110. <a href="http://www.beian.miit.gov.cn/">沪ICP备16042560号</a>
  111. </div>
  112. <div class="leftImg">
  113. <img src="imgs/QRcode1.jpg" alt="">
  114. </div>
  115. </div>
  116. </div>
  117. </body>
  118. <script>
  119. $(function () {
  120. let param = GetRequest();
  121. let id = param['id'];
  122. $.ajax({
  123. type: "get", //请求类型
  124. dataType: "json", //请求数据返回类型
  125. headers:{"content-type":"application/json;charset=utf-8"}, //请求头类型
  126. url: "https://xiaoyou.dgtis.com/admin/news/readDetailForDGTSiteNews", //请求地址
  127. async: true, //同步或者异步 ,ajax 就是为了异步而生
  128. data: {id: id}, //传参
  129. success: function (result) { //成功
  130. if (result.errno === 0) {
  131. console.log(result.data);
  132. $("#title").text(result.data.title);
  133. $(".date").text(result.data.pubDate);
  134. let content = document.querySelector("#content");
  135. content.innerHTML += result.data.content
  136. } else {
  137. console.log(result);
  138. console.log("失败");
  139. }
  140. },
  141. error: function (result) { //失败
  142. console.log(result);
  143. console.log("异常");
  144. }
  145. });
  146. })
  147. function GetRequest() {
  148. var url = location.search; //获取url中"?"符后的字串
  149. var theRequest = new Object();
  150. if (url.indexOf("?") != -1) {
  151. var str = url.substr(1);
  152. strs = str.split("&");
  153. for (var i = 0; i < strs.length; i++) {
  154. theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
  155. }
  156. }
  157. return theRequest;
  158. }
  159. </script>
  160. </html>