index.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  7. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  8. <title>党建数据展示屏</title>
  9. <!-- <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>-->
  10. <script>
  11. var inputContent = {
  12. open:false,
  13. el:'',
  14. time:'',
  15. before_type:'',
  16. };
  17. (function (win,doc) {
  18. win.screen_conf = {
  19. width:0, // 页面可见宽度
  20. height:0, // 页面可见高度
  21. fontSize:0, // 页面单位大小
  22. proportion:0, // 比例
  23. multiple:100, // 倍数
  24. ref:1920, // 参照,
  25. startHeight: window.innerHeight,
  26. maxWidth:999999999
  27. };
  28. doc.onblur = function(){
  29. window.scroll(0,0);
  30. doc.scrollIntoView && doc.scrollIntoView();
  31. };
  32. // 定义 宽度和高度变量
  33. win.handle_size = function () {
  34. // 设置被修改的数据问题
  35. screen_conf.width = win.innerWidth;
  36. screen_conf.height = win.innerHeight;
  37. if(window.orientation==0){
  38. doc.documentElement.style.width = screen_conf.width + 'px';
  39. doc.documentElement.style.minHeight = screen_conf.height + 'px';
  40. }
  41. screen_conf.width = screen_conf.width >= win.screen_conf.maxWidth?win.screen_conf.maxWidth:screen_conf.width;
  42. screen_conf.proportion = screen_conf.width / screen_conf.ref;
  43. screen_conf.fontSize = screen_conf.proportion * screen_conf.multiple;
  44. doc.documentElement.style.fontSize = screen_conf.fontSize+'px';
  45. for (var i=0,count = observer_size.length;i<count;i++) {
  46. typeof observer_size[i] === 'function'&&observer_size[i](screen_conf);
  47. }
  48. };
  49. // 定义观察者函数
  50. win.observer_size = [];
  51. win.handle_size(0,20);
  52. window.addEventListener('resize',win.handle_size);
  53. })(window,document);
  54. </script>
  55. </head>
  56. <body>
  57. <noscript>
  58. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  59. </noscript>
  60. <div id="app"></div>
  61. <!-- built files will be auto injected -->
  62. </body>
  63. </html>