index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!DOCTYPE html>
  2. <html lang="zh-cmn-Hans">
  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. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  8. <link rel="icon" href="<%= BASE_URL %>logo.png">
  9. <title><%= VUE_APP_PRO_NAME %></title>
  10. <style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
  11. <!-- require cdn assets css -->
  12. <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
  13. <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
  14. <% } %>
  15. <script src="./menus.js"></script>
  16. <script>
  17. // 非谷歌浏览器或非IE11时,则提示下载谷歌浏览器进行访问
  18. function BrowserType () {
  19. var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
  20. var isOpera = userAgent.indexOf('Opera') > -1 // 判断是否Opera浏览器
  21. // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
  22. var isIE = window.ActiveXObject || 'ActiveXObject' in window
  23. // var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
  24. var isEdge = userAgent.indexOf('Edge') > -1 // 判断是否IE的Edge浏览器
  25. var isFF = userAgent.indexOf('Firefox') > -1 // 判断是否Firefox浏览器
  26. var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1 // 判断是否Safari浏览器
  27. var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1 && !isEdge // 判断Chrome浏览器
  28. if (isIE) {
  29. var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
  30. reIE.test(userAgent)
  31. var fIEVersion = parseFloat(RegExp['$1'])
  32. console.log(fIEVersion)
  33. if (userAgent.indexOf('MSIE 6.0') != -1 || fIEVersion<11) {
  34. var con = alert('当前浏览器版本过低,为保证更好体验请下载谷歌浏览器进行操作, 点击【确定】升级,如不升级您将不能正常浏览网页!' + '\n' + '下载地址:“https://www.google.cn/chrome”') // 在页面上弹出对话框
  35. if (con == true) {} else {
  36. window.location = 'https://www.google.cn/chrome'
  37. }
  38. }
  39. } // isIE end
  40. if (isFF) { return 'FF' }
  41. if (isOpera) { return 'Opera' }
  42. if (isSafari) { return 'Safari' }
  43. if (isChrome) { return 'Chrome' }
  44. if (isEdge) { return 'Edge' }
  45. }
  46. BrowserType()
  47. </script>
  48. </head>
  49. <body>
  50. <noscript>
  51. <strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  52. </noscript>
  53. <div id="app">
  54. <div id="loading-mask">
  55. <div class="loading-wrapper">
  56. <span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span>
  57. </div>
  58. </div>
  59. </div>
  60. <!-- require cdn assets js -->
  61. <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
  62. <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
  63. <% } %>
  64. <!-- built files will be auto injected -->
  65. </body>
  66. </html>