WholeProcessPlatform/frontend-sjgl/src/views/error-page/401.vue
2026-07-20 16:02:51 +08:00

49 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="error-page-container">
<a-result
status="403"
title="401"
sub-title="抱歉您没有权限访问该页面请尝试重新登录或联系管理员"
>
<template #extra>
<a-space>
<a-button type="primary" @click="goHome">
<template #icon><home-outlined /></template>
回首页
</a-button>
</a-space>
</template>
</a-result>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router';
import { HomeOutlined, ReloadOutlined } from '@ant-design/icons-vue';
const router = useRouter();
// 返回首页(由 permission 守卫动态匹配第一个可用路由)
const goHome = () => {
router.push('/');
};
</script>
<style scoped>
.error-page-container {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #f0f2f5;
}
/* 调整 Result 组件样式,使其更美观 */
.error-page-container :deep(.ant-result) {
padding: 48px 32px;
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
</style>