<template>
  <h3 />
</template>

<script setup>
import Common from '../common/Common';
import { useRouter } from 'vue-router';
import { onMounted,getCurrentInstance } from 'vue';
import TokenClientResource from '../api/base/TokenClientResource';

const router = useRouter();
const { proxy } = getCurrentInstance();


onMounted(() => {
  getVerification();
});

const getVerification = () => {
  TokenClientResource.getVerificationMethod().then(
    successData => {
      if (successData.errorCode === 0) {
        if(successData.data === 'graphic') {
          router.push('/loginGraphic');
        } else{
          router.push('/loginNode');
        }
      } else {
        Notify.error(proxy.$t('lang.Notify.fail'), successData.errorMessage);
      }
    }, error => {
      Common.processException(error);
    });
};

</script>

<style scoped></style>