index.html 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. <link rel="icon" href="<%= BASE_URL %>logo.png">
  8. <title><%= VUE_APP_PRO_NAME %></title>
  9. <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>
  10. <!-- require cdn assets css -->
  11. <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
  12. <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
  13. <% } %>
  14. <script src="./menus.js"></script>
  15. <script>
  16. // 非谷歌浏览器或非IE11时,则提示下载谷歌浏览器进行访问
  17. function BrowserType () {
  18. var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串
  19. var isOpera = userAgent.indexOf('Opera') > -1 // 判断是否Opera浏览器
  20. // var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
  21. var isIE = window.ActiveXObject || 'ActiveXObject' in window
  22. // var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器
  23. var isEdge = userAgent.indexOf('Edge') > -1 // 判断是否IE的Edge浏览器
  24. var isFF = userAgent.indexOf('Firefox') > -1 // 判断是否Firefox浏览器
  25. var isSafari = userAgent.indexOf('Safari') > -1 && userAgent.indexOf('Chrome') == -1 // 判断是否Safari浏览器
  26. var isChrome = userAgent.indexOf('Chrome') > -1 && userAgent.indexOf('Safari') > -1 && !isEdge // 判断Chrome浏览器
  27. if (isIE) {
  28. var reIE = new RegExp('MSIE (\\d+\\.\\d+);')
  29. reIE.test(userAgent)
  30. var fIEVersion = parseFloat(RegExp['$1'])
  31. console.log(fIEVersion)
  32. if (userAgent.indexOf('MSIE 6.0') != -1 || fIEVersion<11) {
  33. var con = alert('当前浏览器版本过低,为保证更好体验请下载谷歌浏览器进行操作, 点击【确定】升级,如不升级您将不能正常浏览网页!' + '\n' + '下载地址:“https://www.google.cn/chrome”') // 在页面上弹出对话框
  34. if (con == true) {} else {
  35. window.location = 'https://www.google.cn/chrome'
  36. }
  37. }
  38. } // isIE end
  39. if (isFF) { return 'FF' }
  40. if (isOpera) { return 'Opera' }
  41. if (isSafari) { return 'Safari' }
  42. if (isChrome) { return 'Chrome' }
  43. if (isEdge) { return 'Edge' }
  44. }
  45. BrowserType()
  46. </script>
  47. </head>
  48. <body>
  49. <noscript>
  50. <strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
  51. </noscript>
  52. <div id="app">
  53. <div id="loading-mask">
  54. <div class="loading-wrapper">
  55. <span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- require cdn assets js -->
  60. <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
  61. <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
  62. <% } %>
  63. <!-- built files will be auto injected -->
  64. </body>
  65. </html>