添加 vue-router 依赖并配置路由,重构登录组件,完善 HTTP 请求拦截器以支持 token 刷新机制

This commit is contained in:
zyh
2025-08-24 19:49:39 +08:00
parent 69bf5500cd
commit 17a1d4e85a
30 changed files with 2368 additions and 28 deletions

View File

@@ -0,0 +1,37 @@
<template>
<div class="permission-denied">
<el-result
icon="warning"
title="权限不足"
sub-title="您没有访问此页面的权限请联系管理员"
>
<template #extra>
<el-button type="primary" @click="goBack">返回上一页</el-button>
<el-button @click="goHome">返回首页</el-button>
</template>
</el-result>
</div>
</template>
<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
function goBack() {
router.go(-1)
}
function goHome() {
router.push({ name: 'Dashboard' })
}
</script>
<style scoped>
.permission-denied {
display: flex;
justify-content: center;
align-items: center;
min-height: 400px;
}
</style>