noticeInfo.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="../../css/mui.min.css" rel="stylesheet" />
  8. <link href="../../css/OA-style.css" rel="stylesheet" />
  9. <style type="text/css">
  10. .mui-content {
  11. background-color: #FFFFFF;
  12. }
  13. #title {
  14. font-size: 20px;
  15. color: #000000;
  16. text-align: center;
  17. padding: 10px 5px 5px 5px;
  18. }
  19. #time {
  20. padding: 0px 5px;
  21. line-height: 16px;
  22. text-align: center;
  23. margin-bottom: 15px;
  24. }
  25. #noticeType {
  26. padding: 0px 5px;
  27. line-height: 16px;
  28. text-align: center;
  29. margin-bottom: 15px;
  30. }
  31. .line {
  32. margin: 0 auto;
  33. border-top: 1px solid #ddd
  34. }
  35. #content {
  36. padding: 10px 15px;
  37. overflow: hidden;
  38. width: 100%;
  39. line-height: 30px;
  40. }
  41. #affix {
  42. padding: 10px 15px;
  43. overflow: hidden;
  44. width: 100%;
  45. line-height: 30px;
  46. }
  47. video {
  48. max-width: 100%;
  49. }
  50. img { max-width: 100%;}
  51. </style>
  52. </head>
  53. <body>
  54. <header class="mui-bar mui-bar-nav">
  55. <a href="" class="mui-action-back back mui-pull-left"><img src="../../images/back.png"></a>
  56. <h1 class="mui-title">公告详情</h1>
  57. </header>
  58. <div class="mui-content">
  59. <div class="top">
  60. <p id="title"></p>
  61. <p id="noticeType"></p>
  62. <p id="time"></p>
  63. </div>
  64. <div class="line"></div>
  65. <div id="content"style="word-wrap:break-word;"></div>
  66. <div id="affix"></div>
  67. </div>
  68. <script src="../../js/mui.min.js"></script>
  69. <script src="../../js/app.js"></script>
  70. <script src="../../js/config.js"></script>
  71. <script type="text/javascript">
  72. mui.init();
  73. mui.plusReady(function() {
  74. var self = plus.webview.currentWebview();
  75. var id = self.notice_id;
  76. getData(id);
  77. })
  78. function getData(id) {
  79. var title1 = mui('#title');
  80. var content = mui('#content');
  81. var time = mui('#time');
  82. var noticeType = mui('#noticeType');
  83. var affix = mui('#affix');
  84. var url = API.API_URL();
  85. var serviceId = "eu_notice_2013V0010PHONE002";
  86. var state = app.getState(); //获取登陆信息
  87. var staffId = state.user.useId;
  88. var obj = {
  89. userId: staffId,
  90. noticeId: id,
  91. ifRead:1
  92. };
  93. app.ajax(serviceId,obj, function(data) {
  94. //服务器返回响应
  95. console.log(JSON.stringify(data))
  96. title1[0].innerHTML = data.title;
  97. content[0].innerHTML = data.noticeContent;
  98. time[0].innerHTML = data.sendTime;
  99. noticeType[0].innerHTML = data.noticeType;
  100. var affixHtml = "";
  101. var affixURL = data.affixUrl;
  102. for(var i = 0, len = affixURL.length; i < len; i++) {
  103. var url = API.API_IP_PORT+affixURL[i].path;
  104. affixHtml += "<a href='#' onclick=\"openFile('"+url+"')\">"+affixURL[i].fileName+"</a><br>";
  105. }
  106. affix[0].innerHTML = affixHtml;
  107. });
  108. };
  109. function openFile(path){
  110. mui.openWindow({
  111. createNew: true,
  112. url: path,
  113. });
  114. }
  115. </script>
  116. </body>
  117. </html>