33 lines
593 B
Vue
33 lines
593 B
Vue
<template>
|
|
<a-spin size="large" tip="正在退出..." class="logout-spin" />
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { removeToken } from '@/utils/token-util'
|
|
import { clearAuthz } from '@/utils/permission'
|
|
|
|
definePageMeta({ layout: 'console' })
|
|
|
|
onMounted(async () => {
|
|
removeToken()
|
|
try {
|
|
localStorage.removeItem('TenantId')
|
|
localStorage.removeItem('UserId')
|
|
} catch {
|
|
// ignore
|
|
}
|
|
clearAuthz()
|
|
await navigateTo('/')
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.logout-spin {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 240px;
|
|
}
|
|
</style>
|
|
|