<template>
  <window-size>
    <div class="option-box green-box" @click="newUserRegister">
      <div class="big-text">
        首次申领 填写领卡信息
      </div>
      <div class="small-text1">
        证件拍照上传，自动填信息
      </div>
    </div>
    <div class="option-box blue-box" @click="linkHealthCard">
      <div class="big-text">
        有健康卡 快速选卡关联
      </div>
      <div class="small-text2">
        已领卡用户，授权关联信息
      </div>
    </div>
    <div>
      <div style="margin-top: 20px; padding-left: 12px;font-size: 14px">
        关于用户隐私说明：
      </div>
      <div class="tips-box">
        <div>
          · 领卡需进行身份信息核验，请确保提供的信息合法、有效
        </div>
        <div>
          · 电子健康卡管理系统平台已采取技术措施保证用户信息安全，不泄露、损毁或丢失
        </div>
        <div>
          · 未经本人授权，平台不会以任何形式向第三方透露申领人信息
        </div>
        <div>
          · 请您妥善保管电子健康卡二维码展示页等信息，以防他人窃取
        </div>
      </div>
    </div>
  </window-size>
</template>

<script setup>
const newUserRegister = () => {
  const isvAppId = '4c84fdd3b55e43c780f407a49d4d0cd4';
  const redirectUri = encodeURI('https://staticweb.hnthyy.cn/newUserRegForElectronicHealthCard')
  window.location.href = `https://health.tengmed.com/open/getUserCode?apiVersion=3&type=register&isvAppId=${isvAppId}&redirect_uri=${redirectUri}`
}

const linkHealthCard = () => {
  const hospitalId = '37156';
  const redirectUri = encodeURI('https://staticweb.hnthyy.cn/linkHealthCardResult')
  window.location.href = `https://health.tengmed.com/open/getHealthCardList?redirect_uri=${redirectUri}&hospitalId=${hospitalId}`;
}
</script>

<style scoped>
.option-box {
  margin-top: 12px;
  width: 88%;
  margin-left: 6%;
  height: 100px;
  border-radius: 8px;
}
.green-box {
  background-color: rgb(170, 255, 172);
  border-bottom: 2px solid green;
}
.blue-box {
  color: white;
  background-color: #54C6FFFF;
  border-bottom: 2px solid #0073af;
}
.big-text {
  padding: 20px 0 0 12px;
  font-size: 22px;
  font-weight: bold;
}
.small-text1 {
  color: rgb(128, 128, 128);
  padding: 8px 0 0 12px;
}
.small-text2 {
  color: #f6f6f6;
  padding: 8px 0 0 12px;
}
.tips-box {
  color: rgb(128, 128, 128);
  font-size: 12px;
  padding-left: 12px;
  margin-top: 12px;
}
.tips-box > div {
  margin-bottom: 8px;
}
</style>