<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
    <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
    <style>
      @charset "utf-8";
      * {
        margin: 0;
        padding: 0;
      }
      /* @font-face {
          font-family: 'Source Han Sans SC';
          src: url('./static/SourceHanSans-Regular.otf') format('truetype');
          font-weight: normal;
          font-style: normal;
        } */
  
      div::-webkit-scrollbar {
        /*滚动条整体样式*/
        width: 6px;
        /*高宽分别对应横竖滚动条的尺寸*/
        height: 6px;
      }
  
      /*定义滚动条轨道 内阴影+圆角*/
      div::-webkit-scrollbar-track {
        border-radius: 10px;
        background-color: rgba(0, 0, 0, 0.1);
      }
  
      /*定义滑块 内阴影+圆角*/
      div::-webkit-scrollbar-thumb {
        border-radius: 10px;
        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
        background-color: rgba(0, 0, 0, 0.1);
      }
  
      html,
      body {
        height: 100%;
        width: 100%;
        background: #e6eaf0;
        font-family: '黑体';
      }
    </style>
  </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>
    <!-- built files will be auto injected -->
  </body>
</html>
<script>
  function stopSafari() {
    //阻止safari浏览器双击放大功能
    let lastTouchEnd = 0  //更新手指弹起的时间
    document.documentElement.addEventListener("touchstart", function (event) {
      //多根手指同时按下屏幕，禁止默认行为
      if (event.touches.length > 1) {
        event.preventDefault();
      }
    });
    document.documentElement.addEventListener("touchend", function (event) {
      let now = (new Date()).getTime();
      if (now - lastTouchEnd <= 300) {
        //当两次手指弹起的时间小于300毫秒，认为双击屏幕行为
        event.preventDefault();
      } else { // 否则重新手指弹起的时间
        lastTouchEnd = now;
      }
    }, false);
    //阻止双指放大页面
    document.documentElement.addEventListener("gesturestart", function (event) {
      event.preventDefault();
    });
  }

  window.onload = () => {
    stopSafari();
    try{
      if(window.parent.U){
        topU = window.parent
      }
    }catch(e){
      try {
        if(window.parent.parent.U){
          topU = window.parent.parent
        }
      } catch (error) {
        if(window.top.U){
          topU = window.top
        } 
      }
    }
    window.topU = topU
  }
  
  document.domain = document.domain.split(".").slice(-2).join(".");

</script>