<template>
	<div class="not-container">
		<img alt="403" class="not-img" src="@/assets/images/tip/login-first.png" />
		<div class="not-detail">
			<h2>你还未登录...</h2>
			<h4>请先登录哦~ ️ 🙄🤷‍♀️</h4>
			<button class="" @click="router.push(HOME_URL)">返回首页</button>
		</div>
	</div>
</template>

<script lang="ts" setup>
import { HOME_URL } from '@/enums/constant/route.ts';
import { useRouter } from 'vue-router';
import { onMounted } from 'vue';
import { localGet } from '@/utils/util.ts';

const router = useRouter();

onMounted(() => {
	const token = localGet('token');
	console.log(token);
	if (token !== null) {
		router.go(-1);
	}
});
</script>

<style lang="scss" scoped>
@import url('./index.scss');
</style>
