<!DOCTYPE html>
<title>我的渝康码</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport"
  content="width=device-width,height=device-height,viewport-fit=cover,initial-scale=1,maximum-scale=1,user-scalable=0">
<meta name="theme-color" content="#368CF5">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="manifest.json">
<link rel="icon" type="image/png" href="./static/logo.png">
<link rel="apple-touch-icon" sizes="64x64" href="./static/logo.png">
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="../common/nav.css">
<script src="../common/base.js"></script>

<div class="capsule capsule--wechat" onclick="navigateHome();">
  <svg class="capsule__menu-icon" viewBox="0 0 64 28" xmlns="http://www.w3.org/2000/svg">
    <circle cx="32" cy="14" r="9.5" />
    <circle cx="54" cy="14" r="6" />
    <circle cx="10" cy="14" r="6" />
  </svg>
  <div class="capsule__splitter"></div>
  <svg class="capsule__exit-icon" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg">
    <circle cx="30" cy="30" r="9" />
    <circle cx="30" cy="30" r="23" stroke-width="6" fill="transparent" />
  </svg>
</div>

<view class="light-code">
  <view style="position: relative;">
    <div class="navbar navbar--wechat-alternative">
      <div class="navbar__placeholder"></div>
      <div class="navbar__inner" style="background: #368CF5;">
        <div class="navbar__left">
          <div class="navbar__buttons">
            <view style="display: flex; align-items: center;" onclick="navigateHome();">
              <image src="./static/nav_home.svg" style="width: 4vw; height: 4vw; margin-right: 1.33vw;"></image>
              <text>首页</text>
            </view>
          </div>
        </div>
        <div class="navbar__center">
          <span style="font-weight: normal;">我的渝康码</span>
        </div>
        <div class="navbar__right"></div>
      </div>
    </div>
  </view>
  <view class="light-code-container">
    <view class="top">
      <view class="top-tip">温馨提示：代人申领已移至首页防疫服务的“亲友代领”</view>
      <view class="top-info">
        <view class="top-info-name" id="masked-info">
          <text class="top-info-name-self" id="masked-name"></text>
          <image class="top-info-name-icon" src="./static/password-btn-white.svg" onclick="toggleMask(false);"></image>
        </view>
        <view class="top-info-name" id="info" style="display: none;">
          <text class="top-info-name-self" id="name"></text>
          <image class="top-info-name-icon" src="./static/password-btn2-white.svg" onclick="toggleMask(true);"></image>
        </view>
        <view bindtap="showRelationUsersPop" class="top-info-exchange">切换亮码人员</view>
      </view>
      <view class="code-area">
        <view class="code-container">
          <view class="code-box code_qrcode" onclick="window.location.href = 'checkin.html';">
            <view class="code_self"
              style="background-image: url(data:image/png;base64, ), linear-gradient(#009a2d, rgb(0,154,45)); background-size: 87% 87%;">
            </view>
          </view>
          <view class="vaccines_done"></view>
          <view class="golden_border"></view>
        </view>
      </view>
      <view class="code-state code-state__green">绿码</view>
      <view class="code-bottom">
        <view class="code-timer"><span id="datetime"></span><span class="bigger" id="sec"></span>
        </view>
        <view bindtap="handleNavigateTo" class="code-report">立即上报</view>
      </view>
    </view>
    <view class="middle">
      <view class="block-item nucleic-block nucleic-block__active" onclick="window.location.href = 'detail.html';">
        <view class="block-title">
          <text>核酸检测</text>
        </view>
        <view class="block-container">
          <view class="block-number">24</view>
          <view class="block-des">
            <view class="block-des-item">小时</view>
            <view class="block-des-item">阴性</view>
          </view>
        </view>
        <!-- <view catchtap="handlderNucilceKeepOrder" class="order-time-sty" wx:if="{{showOrder}}">
          <text>点击更新</text>
          <text wx:if="{{orderState}}">({{orderNumber}}s)</text>
        </view> -->
      </view>
      <view bindtap="handleNavigateTo" class="block-item vaccines-block vaccines-block__active">
        <view class="block-title">
          <text>疫苗接种</text>
        </view>
        <view class="block-container">
          <view class="block-number">3</view>
          <view class="block-des">
            <view class="block-des-item">剂</view>
            <view class="block-des-item">(共3剂)</view>
          </view>
        </view>
      </view>
    </view>
    <view class="bottom">
      <view bindtap="onPlaceCodeScan" class="bt-item" onclick="window.location.href = 'checkin.html';">
        <view class="bt-item-icon bt_item_icon_chagnsuoma"></view>
        <view class="bt-item-text">场所码<text style="color: #006DF2;margin: 0 0.533vw;">|</text>入渝码</view>
      </view>
      <view bindtap="toTongxin" class="bt-item" onclick="navigateToTripCard();">
        <view class="bt-item-icon bt_item_icon_xingcengma"></view>
        <view class="bt-item-text">通信行程卡</view>
      </view>
      <view bindtap="handleNavigateTo" class="bt-item">
        <view class="bt-item-icon bt_item_icon_yiwen"></view>
        <view class="bt-item-text">我有疑问</view>
      </view>
    </view>
  </view>
  <!-- <g-footer></g-footer>
  <g-poplayer bind:close="closePoplayer" visible="{{relationUserPopShow}}">
    <view class="pop-container">
      <view class="pop-header">
        <view class="pop-header-text">切换亮码人员</view>
        <view bindtap="closePoplayer" class="pop-header-close"></view>
      </view>
      <view class="pop-content" wx:if="{{users.length>1}}">
        <view bindtap="exchangeCurrentUser"
          class="{{user.codeId===currentUser.codeId?'pop-item pop-item_active':'pop-item'}}"
          data-codeid="{{user.codeId}}" wx:for="{{users}}" wx:for-item="user"> {{user.username}} <text
            wx:if="{{user.isMe}}">(本人)</text>
        </view>
      </view>
      <view class="pop-content__none" wx:else>
        <view class="others_codes_none_myname">{{currentUser.username}}(本人)</view>
        <image class="others_codes_none" mode="widthFix"
          src="https://static-1300672061.file.myqcloud.com/ykm_home_v3_static/others_code_none.png"></image>
        <view class="others_codes_none_tips">您还未帮亲友代领渝康码！</view>
      </view>
      <view class="{{users.length>1?'pop-bottom':'pop-bottom-whitebg'}}">
        <button bindtap="handleNavigateTo" class="mine__btn" type="primary">去帮亲友代领渝康码</button>
      </view>
    </view>
  </g-poplayer> -->
  <!-- <custompopup id="lightcodecustompopup"></custompopup>
  <intercqpopup id="interCQTips"></intercqpopup>
  <cqnucleictips id="cqnucleictips"></cqnucleictips> -->
</view>
<script>
  setDynamicTime("#datetime", 0, 17);
  setDynamicTime("#sec", 17, 19);
  addStorageField("_name", "#masked-name", "名字", "习近平", presetFilters.lastcharonly);
  addStorageField("_name", "#name", "名字", "习近平");

  function toggleMask(t) {
    document.getElementById("masked-info").style.display = t ? "flex" : "none";
    document.getElementById("info").style.display = t ? "none" : "flex";
  }

  initServiceWorker("chongqing-hc");
</script>