index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <link rel="stylesheet" href="//unpkg.com/swiper@4.3.5/dist/css/swiper.min.css">
  14. <title>返不停</title>
  15. </head>
  16. <body>
  17. <noscript>
  18. <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
  19. Please enable it to continue.</strong>
  20. </noscript>
  21. <div id="app"></div>
  22. <div id="fbt-qr-code" style="display: none;"></div>
  23. <canvas id="fbt-canvas" style="display:none;"></canvas>
  24. <!-- built files will be auto injected -->
  25. </body>
  26. <script>
  27. // 事件监听
  28. document.addEventListener('DOMContentLoaded', resetRem)
  29. window.onresize = resetRem
  30. /**
  31. * [resetRem 重置Rem数值]
  32. */
  33. function resetRem () {
  34. let documentCtx = document.documentElement
  35. documentCtx.style.fontSize = documentCtx.clientWidth / 10 + 'px'
  36. }
  37. // 加载调试工具
  38. ;(function () {
  39. var host = window.location.host
  40. var domain = host.substring(0, host.indexOf('.')) || host.substring(0, host.indexOf(':'))
  41. var erudaEl = document.createElement('script')
  42. erudaEl.src = '//cdn.jsdelivr.net/npm/eruda@2.4.1/eruda.js'
  43. if (/test/.test(domain)) {
  44. document.body.appendChild(erudaEl)
  45. erudaEl.onload = function () {
  46. eruda.init()
  47. }
  48. }
  49. })()
  50. </script>
  51. </html>