message.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. <link href="css/mui.min.css" rel="stylesheet" />
  8. <link href="css/main.css" rel="stylesheet" />
  9. </head>
  10. <body>
  11. <header class="mui-bar mui-bar-nav">
  12. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
  13. <h1 class="mui-title" id="title">消息通知</h1>
  14. </header>
  15. <div class="mui-content">
  16. <div class="mui-control-content mui-active">
  17. <iframe id="message" src="" style="width:100%;overflow: hidden;border:0px;"></iframe>
  18. </div>
  19. </div>
  20. <script src="js/mui.min.js"></script>
  21. <script src="js/main.js"></script>
  22. <script type="text/javascript" charset="utf-8">
  23. (function($, self) {
  24. $.init();
  25. $.plusReady(function() {
  26. plus.webview.currentWebview().setStyle({scrollIndicator:'none'});
  27. var page = document.getElementById("message");
  28. //alert(winSize().height);
  29. page.setAttribute('height', winSize().height);
  30. //alert(page.getAttribute('height'));
  31. page.setAttribute('src', config.host + 'message?header=false&');
  32. window.addEventListener('resize', function() {
  33. oauthArea.style.display = document.body.clientHeight > 400 ? 'block' : 'none';
  34. }, false);
  35. /*
  36. //处理逻辑:1秒内,连续两次按返回键,则退出应用;
  37. var first = null;
  38. plus.key.addEventListener('backbutton', function(){
  39. //首次按键,提示‘再按一次退出应用’
  40. if(!first){
  41. first = new Date().getTime();
  42. mui.toast('再按一次退出应用');
  43. setTimeout(function(){
  44. first = null;
  45. },1000);
  46. }else{
  47. if(new Date().getTime()-first<1000){
  48. plus.runtime.quit();
  49. }
  50. }
  51. }, false);
  52. */
  53. });
  54. }(mui, document));
  55. </script>
  56. </body>
  57. </html>