郑州第一人民医院UI

StudyMaterial.html 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title></title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10. <style>
  11. .container {
  12. padding-right: 15px;
  13. padding-left: 15px;
  14. margin-right: auto;
  15. margin-left: auto
  16. }
  17. .study_title {
  18. text-align: center;
  19. margin: .67em 0;
  20. font-size: 1.2em
  21. }
  22. .study_content {
  23. word-break: break-all;
  24. word-wrap: break-word;
  25. }
  26. .text-center{
  27. text-align: center;
  28. color: #f8ac59;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div class="container">
  34. <h1 id="columsTitle" class="study_title"></h1>
  35. <div id="decription" class="study_content"></div>
  36. </div>
  37. <script src="../js/jquery.min.js"></script>
  38. <script src="../Script/Common/huayi.config.js"></script>
  39. <script>
  40. $(function() {
  41. var fid = GetQueryString("id");
  42. if(fid) {
  43. getBtnsInfo(fid);
  44. }
  45. });
  46. //获取详情
  47. function getBtnsInfo(fid) {
  48. $.ajax({
  49. type: "get",
  50. url: huayi.config.callcenter_url + "equipmentapi/api/StudyMaterialsInfo/getdetails",
  51. dataType: 'json',
  52. async: true,
  53. data: {
  54. id: fid
  55. },
  56. success: function(data) {
  57. /*验证请求*/
  58. if(data.state == "success") {
  59. var res = data.data;
  60. if(res) {
  61. $("#columsTitle").text(res.title);
  62. if(decodeURIComponent(res.content)){
  63. $("#decription").html(decodeURIComponent(res.content));
  64. }else{
  65. $("#decription").html('<p class="text-center">暂无内容</p>');
  66. }
  67. }else{
  68. $('.container').html('<p class="text-center">暂无内容</p>');
  69. }
  70. }
  71. }
  72. });
  73. }
  74. function GetQueryString(item) {
  75. var locationSearch = "";
  76. var tmpLocationArr = location.href.split("?");
  77. if(tmpLocationArr.length > 1) locationSearch = "?" + tmpLocationArr[1];
  78. var svalue = locationSearch.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)", "i"));
  79. var Qvalue = svalue ? svalue[1] : svalue;
  80. if(Qvalue == null) {
  81. return "";
  82. } else {
  83. return Qvalue.trim();
  84. }
  85. }
  86. </script>
  87. </body>
  88. </html>