index.html 4.2 KB

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