index.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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"
  7. content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no,viewport-fit=cover">
  8. <meta name="format-detection" content="telephone=no,email=no">
  9. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
  10. <meta http-equiv="Pragma" content="no-cache"/>
  11. <meta http-equiv="Expires" content="0"/>
  12. <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  13. <title>AF house</title>
  14. </head>
  15. <body>
  16. <noscript>
  17. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
  18. Please enable it to continue.</strong>
  19. </noscript>
  20. <div id="app"></div>
  21. <div id="af-qrcode" style="display: none;"></div>
  22. <!-- built files will be auto injected -->
  23. </body>
  24. <script>
  25. // 事件监听
  26. document.addEventListener('DOMContentLoaded', resetRem)
  27. window.onresize = resetRem
  28. /**
  29. * [resetRem 重置Rem数值]
  30. */
  31. function resetRem () {
  32. let documentCtx = document.documentElement
  33. documentCtx.style.fontSize = documentCtx.clientWidth / 10 + 'px'
  34. }
  35. // 加载调试工具
  36. ;(function () {
  37. var u = navigator.userAgent
  38. var host = window.location.host
  39. var domain = host.substring(0, host.indexOf('.')) || host.substring(0, host.indexOf(':'))
  40. var erudaEl = document.createElement('script')
  41. var aliPayEL = document.createElement('script')
  42. erudaEl.src = '//cdn.jsdelivr.net/npm/eruda@2.4.1/eruda.js'
  43. aliPayEL.src = '//gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js'
  44. if (/^0|192|10|localhost|test/.test(domain)) {
  45. document.body.appendChild(erudaEl)
  46. erudaEl.onload = function () {
  47. // eruda.init()
  48. }
  49. }
  50. if (u.toLowerCase().indexOf('alipay') !== -1) {
  51. document.body.appendChild(aliPayEL)
  52. }
  53. })()
  54. </script>
  55. </html>