index.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <!DOCTYPE html>
  2. <html lang="en">
  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 %>img/login_logo.png">
  8. <title><%= VUE_APP_TITLE %></title>
  9. <script type="text/javascript">
  10. document.write("<script src='config.js?"+new Date().getTime()+"'><\/script>");
  11. </script>
  12. </head>
  13. <body>
  14. <noscript>
  15. <strong>We're sorry but <%= VUE_APP_TITLE %> doesn't work properly without JavaScript
  16. enabled. Please enable it to continue.</strong>
  17. </noscript>
  18. <script type="text/javascript">
  19. var dark = window.localStorage.getItem("APP_DARK");
  20. if(dark){
  21. document.documentElement.classList.add("dark")
  22. }
  23. </script>
  24. <div id="app" class="aminui">
  25. <div class="app-loading">
  26. <div class="app-loading__logo">
  27. <img src="img/menu_logo.png"/>
  28. </div>
  29. <div class="app-loading__loader"></div>
  30. <div class="app-loading__title"><%= VUE_APP_TITLE %></div>
  31. </div>
  32. <style>
  33. .app-loading {position: absolute;top:0px;left:0px;right:0px;bottom:0px;display: flex;justify-content: center;align-items: center;flex-direction: column;background: #fff;}
  34. .app-loading__logo {margin-bottom: 30px;}
  35. .app-loading__logo img {width: 90px;vertical-align: bottom;}
  36. .app-loading__loader {box-sizing: border-box;width: 35px;height: 35px;border: 5px solid transparent;border-top-color: #000;border-radius: 50%;animation: .5s loader linear infinite;position: relative;}
  37. .app-loading__loader:before {box-sizing: border-box;content: "";display: block;width: inherit;height: inherit;position: absolute;top: -5px;left: -5px;border: 5px solid #ccc;border-radius: 50%;opacity: .5;}
  38. .app-loading__title {font-size: 24px;color: #333;margin-top: 30px;}
  39. .dark .app-loading {background: #222225;}
  40. .dark .app-loading__loader {border-top-color: #fff;}
  41. .dark .app-loading__title {color: #d0d0d0;}
  42. @keyframes loader {
  43. 0% {
  44. transform: rotate(0deg);
  45. }
  46. 100% {
  47. transform: rotate(360deg);
  48. }
  49. }
  50. </style>
  51. </div>
  52. <!-- built files will be auto injected -->
  53. </body>
  54. <div id="versionCheck" style="display: none;position: absolute;z-index: 99;top:0;left:0;right:0;bottom:0;padding:40px;background:rgba(255,255,255,0.9);color: #333;">
  55. <h2 style="line-height: 1;margin: 0;font-size: 24px;">当前使用的浏览器内核版本过低 :(</h2>
  56. <p style="line-height: 1;margin: 0;font-size: 14px;margin-top: 20px;opacity: 0.8;">当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p>
  57. <p style="line-height: 1;margin: 0;font-size: 14px;margin-top: 10px;opacity: 0.8;">最低版本要求:Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p>
  58. <p style="line-height: 1;margin: 0;font-size: 14px;margin-top: 10px;opacity: 0.8;">请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p>
  59. </div>
  60. <script type="text/javascript">
  61. function getBrowerInfo(){
  62. var userAgent = window.navigator.userAgent;
  63. var browerInfo = {
  64. type: "unknown",
  65. version: "unknown",
  66. userAgent: userAgent
  67. };
  68. if(document.documentMode){
  69. browerInfo.type = "IE"
  70. browerInfo.version = document.documentMode + ""
  71. }else if(indexOf(userAgent, "Firefox")){
  72. browerInfo.type = "Firefox"
  73. browerInfo.version = userAgent.match(/Firefox\/([\d.]+)/)[1]
  74. }else if(indexOf(userAgent, "Opera")){
  75. browerInfo.type = "Opera"
  76. browerInfo.version = userAgent.match(/Opera\/([\d.]+)/)[1]
  77. }else if(indexOf(userAgent, "Edg")){
  78. browerInfo.type = "Edg"
  79. browerInfo.version = userAgent.match(/Edg\/([\d.]+)/)[1]
  80. }else if(indexOf(userAgent, "Chrome")){
  81. browerInfo.type = "Chrome"
  82. browerInfo.version = userAgent.match(/Chrome\/([\d.]+)/)[1]
  83. }else if(indexOf(userAgent, "Safari")){
  84. browerInfo.type = "Safari"
  85. browerInfo.version = userAgent.match(/Safari\/([\d.]+)/)[1]
  86. }
  87. return browerInfo
  88. }
  89. function indexOf(userAgent, brower) {
  90. return userAgent.indexOf(brower) > -1
  91. }
  92. function isSatisfyBrower(){
  93. var minVer = {
  94. "Chrome": 71,
  95. "Firefox": 65,
  96. "Safari": 12,
  97. "Edg": 97,
  98. "IE": 999
  99. }
  100. var browerInfo = getBrowerInfo()
  101. var materVer = browerInfo.version.split(".")[0]
  102. return materVer >= minVer[browerInfo.type]
  103. }
  104. if(!isSatisfyBrower()){
  105. document.getElementById("versionCheck").style.display = "block";
  106. document.getElementById("versionCheck-type").innerHTML = getBrowerInfo().type;
  107. document.getElementById("versionCheck-version").innerHTML = getBrowerInfo().version;
  108. }
  109. // 组件iframe 不显示NProgress
  110. if (window.location.href.includes("process-form-view")) {
  111. document.getElementsByClassName("app-loading__logo")[0].style.display = "none";
  112. document.getElementsByClassName("app-loading__title")[0].style.display = "none";
  113. document.getElementsByClassName("app-loading__title")[0].style.display = "none";
  114. document.getElementById("app").style.backgroundColor = "#fff"
  115. }
  116. </script>
  117. </html>