<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no,viewport-fit=cover">
  <meta name="format-detection" content="telephone=no,email=no">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
  <meta http-equiv="Pragma" content="no-cache"/>
  <meta http-equiv="Expires" content="0"/>
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
  <title>AF house</title>
</head>
<body>
<noscript>
  <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
    Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<div id="af-qrcode" style="display: none;"></div>
<!-- built files will be auto injected -->
</body>
<script>
  // 事件监听
  document.addEventListener('DOMContentLoaded', resetRem)
  window.onresize = resetRem

  /**
   * [resetRem 重置Rem数值]
   */
  function resetRem () {
    let documentCtx = document.documentElement
    documentCtx.style.fontSize = documentCtx.clientWidth / 10 + 'px'
  }

  // 加载调试工具
  ;(function () {
    var u = navigator.userAgent
    var host = window.location.host
    var domain = host.substring(0, host.indexOf('.')) || host.substring(0, host.indexOf(':'))
    var erudaEl = document.createElement('script')
    var aliPayEL = document.createElement('script')
    erudaEl.src = '//cdn.jsdelivr.net/npm/eruda@2.4.1/eruda.js'
    aliPayEL.src = '//gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js'
    if (/^0|192|10|localhost|test/.test(domain)) {
      document.body.appendChild(erudaEl)
      erudaEl.onload = function () {
        // eruda.init()
      }
    }
    if (u.toLowerCase().indexOf('alipay') !== -1) {
      document.body.appendChild(aliPayEL)
    }
  })()
</script>
</html>