<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache,no-store, must-revalidate">
  <meta http-equiv="expires" content="0">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>已阻止该网站</title>
  <style>
    body {
      margin: 0;
    }

    @media screen and (max-width: 640px) {
      body {
        width: calc(100% - 48px);
        height: 100%;
        padding: 24px;
      }

      .box {
        width: 100%;
      }

      .mar-top-24 {
        margin-top: 24px;
      }


      @media screen and (max-width: 380px) {
        .block-type {
          margin-top: 92px;
        }


      }

      @media screen and (min-width: 381px) {
        .block-type {
          margin-top: 60px;
        }


      }

      .footer-item-1 {
        padding: 0px 8px 0px 0px !important;
      }

      .footer-item-2 {
        padding: 0px 8px 0px 8px !important;
      }

      .footer-item-3 {
        padding: 0px 0px 0px 8px !important;
      }

      .block-type {

        margin-bottom: 24px;
      }

      .main-input {
        display: block;
      }

      .main-radio-box {
        margin-left: -5px;
        margin-bottom: 8px;
      }

      input[name="search"] {
        width: calc(100% - 30px);
      }

      .main {
        padding: 24px;
      }



      .model-header-mobile {
        height: 48px;
        border-bottom: 1px solid #F5F5F5;
        padding: 0px 24px;
        display: flex;
        align-items: center;
      }

      .form-item {
        padding: 12px 24px;
        margin-top: 0px !important;
        border-bottom: 1px solid #F5F5F5;

      }

      .reason {
        border: none !important;
        width: 100% !important;
      }

      .urgency-line {
        margin: 24px 0px;
        padding-left: 24px;
      }

      .outer-content-item-mar {
        margin-top: 8px;
      }

      .input-length {
        position: absolute;
        top: 97px;
        right: 33px;
      }

    }

    @media screen and (min-width: 640px) {
      body {
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      .box {
        width: 640px;
        margin: auto;
      }

      .other-way {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .block-type {
        margin-top: 24px;
        margin-bottom: 48px;
      }

      .main-input {
        display: flex;
        align-items: center;
      }

      input[name="search"] {
        width: 393px;
      }

      .main {
        padding: 24px 36px;
      }

      .outer-content-item {
        display: inline-block;
      }

      .footer-item {
        padding: 0px 24px;
      }

      .input-length {
        position: absolute;
        top: 83px;
        right: 10px;
      }
    }

    .box {
      background: #FFFFFF;
      box-shadow: 0px 2px 18px 0px rgba(0, 0, 0, 0.1);
      border-radius: 12px;
    }

    .header {
      display: block !important;
      padding: 24px 36px;
    }

    .title {
      display: flex;
      align-items: center;
    }

    .block-icon {
      width: 29px;
      height: 32px;
      margin-right: 11px;
    }

    .block-des {
      height: 36px;
      font-family: PingFangSC, PingFang SC;
      font-weight: bold;
      font-size: 24px;
      color: #262626;
      line-height: 36px;
      text-align: left;
      font-style: normal;
    }

    .block-type {

      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 16px;
      color: #8C8C8C;
      line-height: 24px;
      text-align: justify;
      font-style: normal;
    }

    .report {
      margin-bottom: 4px;
      cursor: pointer;
      height: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #3366FF;
      line-height: 20px;
      text-align: left;
      font-style: normal;
    }

    .service-line {
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #8C8C8C;
      line-height: 18px;
      text-align: left;
      font-style: normal;
    }

    .maotou {
      width: 117px;
      height: 32px;
    }

    .main {
      background: linear-gradient(180deg, rgba(50, 199, 255, 0.1) 0%, rgba(50, 199, 255, 0) 100%);
      border-radius: 0px 0px 12px 12px;
    }

    .main-search {
      display: flex;
      align-items: center;
    }

    .main-search-button {
      width: 30px;
      height: 30px;
      line-height: 30px;
      background: #3366FF;
      border-radius: 0px 2px 2px 0px;
      text-align: center;
      cursor: pointer;
    }

    .model-submit:hover,
    .main-search-button:hover {
      background: #5988FF;
    }

    .model-cancel:hover {
      background: #ffffff;
      color: #3366FF;
      border-color: #3366FF;
    }

    .search {
      width: 14px;
      height: 14px;
    }

    .main-radio-box {
      display: flex;
    }

    .main-radio {
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #262626;
      line-height: 18px;
      text-align: left;
      font-style: normal;
      display: flex;
      align-items: center;


      margin-right: 24px;
    }

    input[name="search"] {
      -webkit-appearance: none;
      background-color: #fff;
      background-image: none;
      border-radius: 2px;
      border: 1px solid #d9d9d9;
      box-sizing: border-box;
      color: #262626;
      display: inline-block;
      font-size: 12px;
      height: 30px;
      line-height: 30px;
      outline: none;
      padding: 6px 8px;
      transition: border-color .2s cubic-bezier(.645, .045, .355, 1);



    }

    input[type="text"]:focus {
      border: 1px solid #3366FF;
    }

    .outer-tip {

      min-height: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #8C8C8C;
      line-height: 20px;
      text-align: left;
      font-style: normal;

    }

    .outer-title {

      height: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: bold;
      font-size: 14px;
      color: #262626;
      line-height: 20px;
      text-align: left;
      font-style: normal;
      margin-right: 24px;
    }

    .outer-content {
      margin-top: 8px;
      display: flex;
    }

    a {

      height: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #3366FF;
      line-height: 20px;
      text-align: left;
      font-style: normal;
      margin-right: 16px;

    }

    .outer {
      margin-top: 24px;
    }

    .footer {
      margin-top: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .footer-item {

      height: 20px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 14px;
      color: #3366FF;
      line-height: 20px;
      text-align: left;
      font-style: normal;


      margin-right: 0;

      border-right: 1px solid #D9D9D9;

    }

    .footer-item:last-child {
      border-right: none;
    }

    .model {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 99999;
      display: none;
    }

    .model-content {
      position: fixed;
      top: 50%;
      left: 50%;
      width: 432px;
      height: 330px;
      background: #FFF;
      box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16);
      transform: translate(-50%, -50%);
      border-radius: 2px;
      padding: 16px 24px 24px 24px;
    }

    .model-content-mobile {
      position: fixed;
      bottom: 0;
      width: 100%;
      height: 370px;
      background: #FFF;
      box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.16);
      border-radius: 2px;

    }

    .close {
      position: absolute;
      top: 10px;
      right: 10px;
      background: none;
      border: none;
      font-size: 20px;
      font-weight: lighter;
      color: #8C8C8C;
      cursor: pointer;
    }

    .close:hover {
      color: #3366FF;

    }

    .report-title {
      height: 24px;
      font-family: PingFangSC, PingFang SC;
      font-weight: bold;
      font-size: 16px;
      color: #262626;
      line-height: 24px;
      text-align: left;
      font-style: normal;

    }

    .model-main {
      display: flex;
      align-items: center;
      justify-content: center;

    }

    .report-mao {
      width: 108px;
      height: 171px;
      margin-right: 24px;
      margin-top: 24px;

    }

    .form-title {
      margin-bottom: 4px;
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #262626;
      line-height: 18px;
      text-align: left;
      font-style: normal;
    }

    .form-title-mobile {

      margin-bottom: 4px;
      font-family: PingFangSC, PingFang SC;
      font-weight: bold;
      font-size: 12px;
      color: #262626;
      width: 68px;
      text-align: left;
      font-style: normal;
    }

    .form-title span {
      color: red;
    }

    .form-item {
      position: relative;
      margin-top: 6px;
    }

    .form-item-first {
      margin-top: 24px;
    }

    .urgency-line {
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #8C8C8C;
      line-height: 18px;
      text-align: left;
      font-style: normal;
    }

    .model-footer {
      margin-top: 24px;
      display: flex;
      align-items: center;
      float: right;
    }

    .model-cancel {
      cursor: pointer;
      width: 60px;
      height: 30px;
      background: #FFFFFF;
      border-radius: 2px;
      border: 1px solid #D9D9D9;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #262626;
      line-height: 30px;
      text-align: center;
    }

    .model-submit {
      cursor: pointer;
      margin-left: 8px;
      width: 60px;
      height: 30px;
      background: #3366FF;
      text-align: center;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #FFFFFF;
      line-height: 30px;
    }

    input[name="phone"] {
      -webkit-appearance: none;
      background-color: #fff;
      background-image: none;
      border-radius: 2px;
      border: 1px solid #d9d9d9;
      box-sizing: border-box;
      color: #262626;
      display: inline-block;
      font-size: 12px;
      height: 30px;
      line-height: 30px;
      outline: none;
      padding: 6px 8px;
      transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
      width: 300px;
    }

    .reason {
      resize: none;
      width: 300px;
      height: 80px;
      background: #FFFFFF;
      border-radius: 2px;
      border: 1px solid #D9D9D9;
      -webkit-appearance: none;
      background-image: none;
      box-sizing: border-box;
      color: #262626;
      display: inline-block;
      font-size: 12px;
      outline: none;
      padding: 6px 8px;
    }

    input[name="phone"]::placeholder,
    .reason::placeholder {
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #BFBFBF;
      line-height: 18px;
      text-align: left;
      font-style: normal;
    }

    .input-err {
      visibility: hidden;
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #E51C23;
      line-height: 18px;
      text-align: left;
      font-style: normal;
    }

    .input-length {

      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #262626;
      line-height: 18px;
      text-align: left;
      font-style: normal;
      background-color: #FFF;
    }

    .input-length-num {
      color: #3366FF;
    }

    #reason-input-err {
      margin-top: -4px;
    }

    .msg-icon {
      width: 16px;
      height: 16px;
    }

    .message {
      display: flex;
      align-items: center;
      padding: 8px 16px;

      display: none;
      background: #FFFFFF;
      box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.2);
      border-radius: 2px;
      z-index: 999999999;
    }

    .message .text {
      height: 18px;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      font-size: 12px;
      color: #262626;
      line-height: 18px;
      text-align: left;
      font-style: normal;
      margin-left: 4px;
    }

    .message-container {
      position: fixed;
      left: 0;
      top: 20px;
      right: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
    }


    @keyframes message-move-out {
      0% {
        opacity: 1;
        transform: translateY(0);
      }

      100% {
        opacity: 0;
        transform: translateY(-100%);
      }
    }

    .message-container .message.move-out {
      animation: message-move-out 0.3s ease-in-out;
      animation-fill-mode: forwards;
    }

    .message-container .message.move-in {
      animation: message-move-in 0.3s ease-in-out;
    }

    @keyframes message-move-in {
      0% {

        opacity: 0;

        transform: translateY(-100%);
      }

      100% {
        opacity: 1;

        transform: translateY(0);
      }
    }

    .form-item-mobile {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .form-item-mobile input {
      width: 160px !important;
      border: none !important;
      box-sizing: border-box;
      color: #262626;
      display: inline-block;
      font-size: 12px;
      height: 18px !important;
      line-height: 18px !important;
      outline: none;
      padding: 0px !important;
      transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
    }

    .model-footer-mobile {
      display: flex;
      justify-content: center;
      width: 100%;
      margin-top: 0px !important;
    }

    .model-footer-mobile .model-cancel {
      width: 120px !important;
    }

    .model-footer-mobile .model-submit {
      margin-left: 12px !important;
      width: 195px !important;
    }


    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
      background-color: #e4e4e4;
      border-radius: 3px;
    }


    ::-webkit-scrollbar-thumb {
      background-color: #a1a3a9;
      border-radius: 3px;
    }

    /* #show-model{
      display: none;
    } */
  </style>
  <script src="https://cdn.damddos.com/cloud-brain/dns-static/crypto-js.min.js"></script>
</head>

<body>
  <div class="box">
    <div class="header">
      <div class="title">
        <img class="block-icon" src="https://cdn.damddos.com/cloud-brain/dns-static/images/block.png" alt="">
        <div class="block-des">您访问的网站由于存在安全威胁已被拦截</div>
      </div>
      <div class="block-type">
        <div id="block-type-des">根据企业策略限制，无法访问当前网站</div>
      </div>
      <div class="other-way">
        <div class="report-service">
          <div class="service-line">如果您有任何问题，请拨打以下电话进行反馈。</div>
          <div class="service-line">服务热线：400-925-9120 转 5</div>
        </div>
        <img class="maotou mar-top-24" src="https://cdn.damddos.com/cloud-brain/dns-static/images/maotou.png" alt="">
      </div>
    </div>
    <div class="main">
      <div class="main-input">
        <div class="main-radio-box">
          <div class="main-radio"> <input type="radio" id="baidu" name="gender" value="1" />百度</div>
          <div class="main-radio"> <input type="radio" id="bing" name="gender" value="2" />Bing</div>
        </div>

        <div class="main-search"><input type="text" id="search-text" name="search" />
          <div class="main-search-button" id="go-search"> <img class="search"
              src="https://cdn.damddos.com/cloud-brain/dns-static/images/search.png" alt="">
          </div>
        </div>
      </div>
      <div class="outer">
        <div class="outer-tip">如果您需要下载软件，可使用以下安全链接：</div>
        <div class="outer-content"><span class="outer-title">应用</span><a href="https://lestore.lenovo.com/">联想应用商店</a><a
            href="https://pc.qq.com/category/c0.html">腾讯软件中心</a></div>
      </div>

      <div class="outer">
        <div class="outer-tip">更多绿色链接：</div>
        <div class="outer-content"><span class="outer-title">办公</span>
          <div class="outer-content-item">
            <div class="outer-content-item">
              <a href="https://www.wps.cn/">WPS Office</a>
              <a href="https://www.microsoft.com/zh-cn/microsoft-365">Microsoft Office</a>
            </div>
            <div class="outer-content-item outer-content-item-mar">
              <a href="https://docs.qq.com/">腾讯文档</a>
              <a href="https://www.microsoft.com/zh-cn/edge/download">Microsoft
                Edge</a>
            </div>
            <div class="outer-content-item outer-content-item-mar">
              <a href="https://www.google.cn/intl/en_uk/chrome/">Chrome</a>
            </div>
          </div>
        </div>
        <div class="outer-content"><span class="outer-title">生活</span>
          <div class="outer-content-item">
            <div class="outer-content-item">
              <a href="https://www.icbc.com.cn/">中国工商银行</a><a href="https://www.boc.cn/ebanking/">中国银行</a>
            </div>
            <div class="outer-content-item outer-content-item-mar">
              <a href="http://www.ccb.com/">中国建设银行</a><a href="https://www.bankcomm.com/">交通银行</a>
            </div>
          </div>
        </div>
      </div>
      <div class="footer">
        <a class="footer-item footer-item-1" href="http://www.ctct.cn/">电信安全官网</a>
        <a class="footer-item footer-item-2" href="http://www.chinatelecom.com.cn/">中国电信官网</a>
        <a class="footer-item footer-item-3" href="http://www.ctct.cn/products/anquanmao">天翼安全猫</a>
      </div>
    </div>
  </div>

  <!-- 弹窗代码开始 pc端-->
  <div class="model model-pc">
    <div class="model-content">
      <div class="model-header">
        <button class="close" id="closeModel">×
        </button>
        <div class="report-title">我要上报</div>
      </div>
      <div class="model-main">
        <img class="report-mao" src="https://cdn.damddos.com/cloud-brain/dns-static/images/report-mao.png" alt="">
        <div>
          <div class="form-item form-item-first">
            <div class="form-title"><span>*</span>上报原因：</div>
            <textarea id="reason" class="reason" cols="50" rows="5" maxlength="200" minlength="5"
              placeholder="若您有疑问或认为存在误报，请告诉我们，我们将积极为您处理。"></textarea>
            <span class="input-err" id="reason-input-err"></span>
            <span class="input-length"><span class="input-length-num" id="reason-input-length">0</span>/200</span>
          </div>
          <div class="form-item">
            <div class="form-title">联系方式：</div>
            <input type="text" id="phone" maxlength="30" name="phone" placeholder="方便我们为您提供后续服务" />
            <span class="input-err" id="phone-input-err">不能包含特殊字符</span>
          </div>
          <div class="form-item urgency-line">紧急处理热线电话：400-925-9120 转 5</div>
        </div>
      </div>
      <div class="model-footer">
        <div class="model-cancel" id="cancel-model">取消</div>
        <div class="model-submit" id="submitReport">提交</div>
      </div>

    </div>
  </div>

  <!-- 弹窗代码结束 -->



  <!-- 弹窗代码开始 移动端-->
  <div class="model model-mobile">
    <div class="model-content-mobile">
      <div class="model-header model-header-mobile">
        <button class="close" id="closeModelMobile">×
        </button>
        <div class="report-title">我要上报</div>
      </div>
      <div class="model-main">
        <div>
          <div class="form-item">
            <div class="form-title form-title-mobile"><span>*</span>上报原因：</div>
            <textarea id="reason-mobile" class="reason" cols="50" rows="5" maxlength="200" minlength="5"
              placeholder="若您有疑问或认为存在误报，请告诉我们，我们将积极为您处理。"></textarea>
            <span class="input-err" id="reason-input-err-mobile"></span>
            <span class="input-length"><span class="input-length-num"
                id="reason-input-length-mobile">0</span>/200</span>
          </div>
          <div class="form-item form-item-mobile">
            <div class="form-title-mobile">联系方式：</div>
            <input type="text" id="phone-mobile" maxlength="30" name="phone" placeholder="方便我们为您提供后续服务" />
            <span class="input-err" id="phone-input-err-mobile">不能包含特殊字符</span>
          </div>
          <div class="urgency-line">紧急处理热线电话：400-925-9120 转 5</div>
        </div>
      </div>
      <div class="model-footer model-footer-mobile">
        <div class="model-cancel" id="cancel-model-mobile">取消</div>
        <div class="model-submit" id="submitReport-mobile">提交</div>
      </div>

    </div>
  </div>

  <!-- 弹窗代码结束 -->



  <div class="message-container">
    <div class="message move-in" id="msg-success">
      <img class="msg-icon" src="https://cdn.damddos.com/cloud-brain/dns-static/images/msg-success.png" alt="">
      <div id="msg-success-text" class="text"></div>
    </div>
    <div class="message move-in" id="msg-error">
      <img class="msg-icon" src="https://cdn.damddos.com/cloud-brain/dns-static/images/msg-error.png" alt="">
      <div id="msg-error-text" class="text"></div>
    </div>
  </div>

</body>

<script>
  var pageType = ''
  var rondom = "GKhsoij8UI7698jkk=dhf=hjhf=="
  document.addEventListener('DOMContentLoaded', function () {
    let clientWidth = document.documentElement.clientWidth
    console.log('clientWidth')
    console.log(clientWidth)
    if (clientWidth > 640) {
      pageType = ''
    } else {
      pageType = '-mobile'
    }
    let radioButton = document.getElementById('baidu');
    radioButton.checked = true;
    //let openModel = document.getElementById('show-model');
    //openModel.onclick = showModel
    let goSearch = document.getElementById('go-search');
    goSearch.onclick = search
    let noModel = document.getElementById('closeModel');
    noModel.onclick = closeModel
    let cancelModel = document.getElementById('cancel-model');
    cancelModel.onclick = closeModel
    let submit = document.getElementById('submitReport');
    submit.onclick = submitReport
    let closeModelMobile = document.getElementById('closeModelMobile');
    closeModelMobile.onclick = closeModel
    let cancelModelMobile = document.getElementById('cancel-model-mobile');
    cancelModelMobile.onclick = closeModel
    let submitMobile = document.getElementById('submitReport-mobile');
    submitMobile.onclick = submitReport
    var reason = document.getElementById('reason' + pageType);
    reason.addEventListener('input', reasonChange);
    reason.addEventListener('blur', reasonChange);
    var phone = document.getElementById('phone' + pageType);
    phone.addEventListener('input', phoneChange);
  });
  document.addEventListener('beforeunload', function () {
    var reason = document.getElementById('reason' + pageType);
    reason.removeEventListener('input', reasonChange);
    reason.removeEventListener('blur', reasonChange);
    var phone = document.getElementById('phone' + pageType);
    phone.removeEventListener('input', phoneChange);
  });
  const searchParams = new URLSearchParams(window.location.search);
  var domain = searchParams.get('rd');
  console.log('domain', domain)
  function phoneChange(event) {
    if (event.target.value && /[\(\)<>"'%;&\+ ]/.test(event.target.value)) {
      document.getElementById("phone-input-err" + pageType).style.visibility = 'visible';
    } else {
      document.getElementById("phone-input-err" + pageType).style.visibility = 'hidden';
    }
  }
  function reasonChange(event) {
    document.getElementById("reason-input-length" + pageType).innerHTML = event.target.value.length
    if (event.target.value && /[\(\)<>"'%;&\+ ]/.test(event.target.value)) {
      document.getElementById("reason-input-err" + pageType).innerHTML = "不能包含特殊字符"
      document.getElementById("reason-input-err" + pageType).style.visibility = 'visible';
      return false
    } else {
      document.getElementById("reason-input-err" + pageType).style.visibility = 'hidden';
    }

    if ((!event.target.value || event.target.value.length < 5) && event.type === "blue") {
      document.getElementById("reason-input-err" + pageType).innerHTML = "请至少输入5个字符"
      document.getElementById("reason-input-err" + pageType).style.visibility = 'visible';
    } else {
      document.getElementById("reason-input-err" + pageType).style.visibility = 'hidden';
    }
  }
  function search() {
    let selectBaidu = document.getElementById('baidu').checked
    let searchText = document.getElementById("search-text").value
    if (selectBaidu) {
      location.href = `https://www.baidu.com/s?wd=${searchText}`
    } else {
      location.href = `https://cn.bing.com/search?q=${searchText}`
    }
  }

  function showModel() {
    let clientWidth = document.documentElement.clientWidth
    if (clientWidth > 640) {
      document.querySelector('.model-pc').style.display = 'block';
    } else {
      document.querySelector('.model-mobile').style.display = 'block';
    }
  }
  function closeModel() {
    document.getElementById("reason" + pageType).value = ''
    document.getElementById("phone" + pageType).value = ''
    document.getElementById("reason-input-length" + pageType).innerHTML = 0
    document.getElementById("reason-input-err" + pageType).style.visibility = 'hidden';
    document.getElementById("phone-input-err" + pageType).style.visibility = 'hidden';
    let clientWidth = document.documentElement.clientWidth
    if (clientWidth > 640) {
      document.querySelector('.model-pc').style.display = 'none';
    } else {
      document.querySelector('.model-mobile').style.display = 'none';
    }

  }
  // function base64Encode(text) {
  //   var encrypt = CryptoJS.AES.encrypt(text, CryptoJS.enc.Utf8.parse(rondom), {
  //     mode: CryptoJS.mode.ECB,
  //     padding: CryptoJS.pad.Pkcs7
  //   }).toString();
  //   return encrypt
  // }
  function base64Decode(encrypt) {
    var decrypt = CryptoJS.AES.decrypt(encrypt, CryptoJS.enc.Utf8.parse(rondom), {
      mode: CryptoJS.mode.ECB,
      padding: CryptoJS.pad.Pkcs7
    }).toString(CryptoJS.enc.Utf8);
    return decrypt
  }


  function encryptDeal(url, body) {
    let accessKeyInit = "c4j97IuoBqf71GBGbUCZxA=="
    let secretKeyInit = "vsA8A89hWRWYuW+HhPNGzor6szmEpl8ldoDSbil4fMU="
    let accessKey = base64Decode(accessKeyInit)
    let secretKey = base64Decode(secretKeyInit)
    let bodyStr = JSON.stringify(body, null, 0);
    let params = "";
    const timestamp = new Date().getTime();
    var sign = CryptoJS.MD5(bodyStr).toString();
    var signStr = "POST" + "|" + url + "|" + timestamp + "|" + accessKey + "|" + params + "|" + sign
    var hash = CryptoJS.HmacSHA256(signStr, secretKey);
    var hash1 = hash.toString();
    var hashInBase64 = CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(accessKey + ":" + hash1));
    var timestamp1 = timestamp
    var authorization = hashInBase64
    return {
      tonce: timestamp1,
      authorization: authorization,
      body: bodyStr
    }
  }
  function submitReport() {
    let url = location.origin + '/ipt-page/question/domainSubmit'
    let description = document.getElementById("reason" + pageType).value
    let contactMobile = document.getElementById("phone" + pageType).value
    let passReason = true
    let passMobile = true
    if (contactMobile && /[\(\)<>"'%;&\+ ]/.test(contactMobile)) {
      document.getElementById("phone-input-err" + pageType).style.visibility = 'visible';
      passMobile = false
    }
    if (description && /[\(\)<>"'%;&\+ ]/.test(description)) {
      document.getElementById("reason-input-err" + pageType).innerHTML = "不能包含特殊字符"
      document.getElementById("reason-input-err" + pageType).style.visibility = 'visible';
      passReason = false
      return false
    }
    if (!description || description.length < 5) {
      document.getElementById("reason-input-err" + pageType).innerHTML = "请至少输入5个字符"
      document.getElementById("reason-input-err" + pageType).style.visibility = 'visible';
      passReason = false
    }

    if (!passReason || !passMobile) {
      return false
    }
    const xhr = new XMLHttpRequest();
    xhr.onreadystatechange = function () {
      if (xhr.readyState == 4) {
        if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {
          let result = JSON.parse(xhr.responseText);
          console.log('拦截详情查询result')
          console.log(result)
          if (result.code == '200') {
            let msgElement = document.getElementById("msg-success-text");
            msgElement.innerHTML = '提交成功'
            document.getElementById("msg-success").style.display = 'flex';
            setTimeout(() => {
              document.getElementById("msg-success").style.display = 'none';
            }, 3000);
          } else {
            let msgElement = document.getElementById("msg-error-text");
            msgElement.innerHTML = result.message
            document.getElementById("msg-error").style.display = 'flex';
            setTimeout(() => {
              document.getElementById("msg-error").style.display = 'none';
            }, 3000);
          }
          closeModel()
        }
      }
    };
    let params = { domain: domain, description: description, contactMobile: contactMobile }
    let info = encryptDeal("/question/domainSubmit", params)
    xhr.open("post", url, false);
    xhr.setRequestHeader('Content-Type', 'application/json');
    xhr.setRequestHeader('Json-Rpc-Tonce', info.tonce);
    xhr.setRequestHeader("Authorization", info.authorization);
    xhr.send(info.body);
  }
</script>

</html>