feat: 添加登录页面URL配置及页面权限控制

- 在.env文件中新增VITE_LOGIN_URL配置
- 在App.vue中引入并调用usePageAuth以实现页面权限控制
- 更新route.ts以使用环境变量中的登录页面URL
This commit is contained in:
陈剑术
2025-06-04 12:25:13 +08:00
parent f23d8128f9
commit dcae738e69
4 changed files with 55 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ import { useUserStore } from '@/store'
import { needLoginPages as _needLoginPages, getNeedLoginPages, getLastPage } from '@/utils'
// TODO Check
const loginRoute = '/pages/login/index'
const loginRoute = import.meta.env.VITE_LOGIN_URL
const isLogined = () => {
const userStore = useUserStore()