knowInfo.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <style>
  8. * {
  9. margin: 0;
  10. padding: 0;
  11. box-sizing: border-box;
  12. }
  13. body {
  14. user-select: none;
  15. width: 100%;
  16. height: 100%;
  17. }
  18. .title {
  19. box-shadow: 0 1px 6px #ccc;
  20. position: fixed;
  21. z-index: 10;
  22. right: 0;
  23. left: 0;
  24. height: 44px;
  25. padding-right: 10px;
  26. padding-left: 10px;
  27. border-bottom: 0;
  28. background-color: #f7f7f7;
  29. text-align: center;
  30. font-size: 17px;
  31. font-weight: 500;
  32. line-height: 44px;
  33. }
  34. .content {
  35. padding: 85px 15px 15px;
  36. }
  37. p {
  38. font-size: 14px;
  39. margin-top: 0;
  40. margin-bottom: 10px;
  41. color: #8f8f94;
  42. text-align: center;
  43. }
  44. </style>
  45. </head>
  46. <script>
  47. const id = window.location.href.split('?sId=')[1]
  48. // https://ypbwg.4dage.com
  49. fetch(`/api/show/knowledge/cms/detail/${id}`)
  50. .then(response => response.json())
  51. .then(data => {
  52. const dataRes = data.data
  53. const titleDom = document.querySelector('.title')
  54. const contentDom = document.querySelector('.content')
  55. titleDom.innerHTML = dataRes.cName
  56. contentDom.innerHTML = dataRes.cContent
  57. });
  58. </script>
  59. <body>
  60. <!-- 标题 -->
  61. <div class="title"></div>
  62. <!-- 主要内容 -->
  63. <div class="content"></div>
  64. </body>
  65. </html>