<template>
  <div class="login-box">
    <!-- 登陆中 -->
    <div v-if="loginState == 0">
      <van-empty description="登陆中"></van-empty>
    </div>
    <!-- 登陆成功 -->
    <div v-else-if="loginState == 1">
      <van-empty description="登陆成功"></van-empty>
    </div>
    <!-- 登陆失败 -->
    <div v-else-if="loginState == 2">
      <van-empty image="network" description="登录失败"></van-empty>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  name: "login",
});
</script>

<script lang="ts" setup>
import { ref, nextTick } from "vue";
import { useLogin, RouterBus } from "@/hooks";
const loginState = ref(0);

const { router } = new RouterBus();

nextTick(() => {
  router.push("/home/test");
});
</script>

<style scoped lang="scss">
.login-box {
  display: flex;
  justify-content: center;
  align-items: center;
}
</style>
