選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

100 行
3.4 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title></title>
  7. <script src="js/mui.min.js"></script>
  8. <link href="css/mui.min.css" rel="stylesheet" />
  9. <link href="css/style.css" rel="stylesheet" />
  10. <script src="js/serverurl.js"></script>
  11. <script src="js/tools.js"></script>
  12. <script src="js/jquery-1.10.2.min.js"></script>
  13. <style type="text/css">
  14. .NewsContent {
  15. margin-top: 15px;
  16. padding: 5px 5px;
  17. font-size: 14px;
  18. color: #333333;
  19. width: 350px;
  20. }
  21. .NewsContent p,
  22. p {
  23. color: #333333;
  24. font-size: 14px;
  25. width: 350px;
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <header class="mui-bar mui-bar-nav">
  31. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  32. <h1 id="title" class="mui-title"></h1>
  33. <a class="mui-icon mui-icon-reload mui-pull-right" style="font-weight:bold; color: #FFFFFF;" id="btreload"></a>
  34. </header>
  35. <div class="mui-content" style="background-color:#fff">
  36. <div style="height: 48px; font-size: 18px; padding-left: 8px; padding-top: 6px; font-family: '微软雅黑';">
  37. <div id="NewsTitle"></div>
  38. </div>
  39. <div id="CreateDate" style="padding-left: 8px; font-size: 11px;color: #8F8F94; ">2015</div>
  40. <div style="clear: both;"></div>
  41. <div id="NewsContent" class="NewsContent">
  42. </div>
  43. </div>
  44. <script type="text/javascript">
  45. mui.plusReady(function() {
  46. var self = plus.webview.currentWebview();
  47. var NewsID = self.NewsID;
  48. //刷新按钮
  49. var refbutton = document.getElementById("btreload");
  50. refbutton.addEventListener('tap', function(event) {
  51. plus.webview.currentWebview().reload();
  52. plus.nativeUI.showWaiting();
  53. });
  54. //请求详情
  55. // var xhr = new plus.net.XMLHttpRequest();
  56. // xhr.responseType = "json";
  57. // xhr.onreadystatechange = function() {
  58. // switch(xhr.readyState) {
  59. // case 4:
  60. // if(xhr.status == 200) {
  61. // if(xhr.response.result == "ok") {
  62. // var dataobject = xhr.response.msg;
  63. // document.getElementById("NewsTitle").innerText = dataobject.title;
  64. // document.getElementById("CreateDate").innerText = jsonDateFormatDateTime(dataobject.date);
  65. // document.getElementById("NewsContent").innerHTML = dataobject.content;
  66. // plus.nativeUI.closeWaiting();
  67. // }
  68. // } else {
  69. // plus.nativeUI.closeWaiting();
  70. // plus.nativeUI.toast('世界上最遥远的距离就是没有网络。');
  71. // }
  72. // break;
  73. // default:
  74. // break;
  75. // }
  76. // }
  77. // var widths = plus.screen.resolutionWidth - 10;
  78. // xhr.open("GET", encodeURI(serverdomain + "/WebService/UserService.ashx?Action=getSchoolNews&content={'articleID':'" + NewsID + "','app':'1'}&width=" + widths + ""));
  79. // xhr.send();
  80. console.log(NewsID)
  81. mui.post(api+'/user/getCompanyNewsDetail',{data:NewsID},function(res){
  82. plus.nativeUI.closeWaiting();
  83. if(res.code=="200"){
  84. var dataobject = res.data;
  85. document.getElementById("NewsTitle").innerText = dataobject.title;
  86. document.getElementById("CreateDate").innerText = jsonDateFormatDateTime(dataobject.date);
  87. document.getElementById("NewsContent").innerHTML = dataobject.content;
  88. $("#NewsContent").html($("#NewsContent").text())//
  89. }
  90. },'json')
  91. });
  92. </script>
  93. </body>
  94. </html>