<template>
  <window-size>
    <div style="width: 100%; text-align: center; font-size: 18px; font-weight: bold; margin-top: 50px">激活健康卡</div>
  </window-size>
</template>

<script setup>
import {getEncryptOpenid} from '@/api/electronic-health-card'
import {onMounted} from "vue";

onMounted(() => {
  getEncryptOpenid().then(res => {
    const encryptData = encodeURI(res);
    const redirectUri = encodeURI('https://staticweb.hnthyy.cn/electronicHealthCardHome')
    window.location.href = `https://health.tengmed.com/open/batchActiveCard?open_id=${encryptData}&redirect_uri=${redirectUri}`
  })
})
</script>