feat(custom): i
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getToken, refreshAccessToken, isNullOrWhitespace } from '@/utils'
|
||||
import { getToken, isNullOrWhitespace } from '@/utils'
|
||||
|
||||
const WHITE_LIST = ['/login', '/404']
|
||||
export function createPermissionGuard(router) {
|
||||
@@ -14,7 +14,7 @@ export function createPermissionGuard(router) {
|
||||
/** 有token的情况 */
|
||||
if (to.path === '/login') return { path: '/' }
|
||||
|
||||
refreshAccessToken()
|
||||
// refreshAccessToken()
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { basicRoutes, EMPTY_ROUTE, NOT_FOUND_ROUTE } from './routes'
|
||||
import { getToken, isNullOrWhitespace } from '@/utils'
|
||||
import { useUserStore, usePermissionStore } from '@/store'
|
||||
|
||||
const isHash = import.meta.env.VITE_USE_HASH === 'true'
|
||||
const isHash = true
|
||||
export const router = createRouter({
|
||||
history: isHash ? createWebHashHistory('/') : createWebHistory('/'),
|
||||
routes: basicRoutes,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const Layout = () => import('@/layout/index.vue')
|
||||
// const Layout = () => import('@/layout/index.vue')
|
||||
|
||||
export const basicRoutes = [
|
||||
{
|
||||
@@ -18,42 +18,42 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: 'ExternalLink',
|
||||
path: '/external-link',
|
||||
component: Layout,
|
||||
meta: {
|
||||
title: '外部链接',
|
||||
icon: 'mdi:link-variant',
|
||||
order: 4,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'LinkGithubSrc',
|
||||
path: 'https://github.com/zclzone/vue-naive-admin',
|
||||
meta: {
|
||||
title: '源码 - github',
|
||||
icon: 'mdi:github',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'LinkGiteeSrc',
|
||||
path: 'https://gitee.com/zclzone/vue-naive-admin',
|
||||
meta: {
|
||||
title: '源码 - gitee',
|
||||
icon: 'simple-icons:gitee',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'LinkDocs',
|
||||
path: 'https://zclzone.github.io/vue-naive-admin-docs',
|
||||
meta: {
|
||||
title: '文档 - vuepress',
|
||||
icon: 'mdi:vuejs',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// name: 'ExternalLink',
|
||||
// path: '/external-link',
|
||||
// component: Layout,
|
||||
// meta: {
|
||||
// title: '外部链接',
|
||||
// icon: 'mdi:link-variant',
|
||||
// order: 4,
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// name: 'LinkGithubSrc',
|
||||
// path: 'https://github.com/zclzone/vue-naive-admin',
|
||||
// meta: {
|
||||
// title: '源码 - github',
|
||||
// icon: 'mdi:github',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: 'LinkGiteeSrc',
|
||||
// path: 'https://gitee.com/zclzone/vue-naive-admin',
|
||||
// meta: {
|
||||
// title: '源码 - gitee',
|
||||
// icon: 'simple-icons:gitee',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: 'LinkDocs',
|
||||
// path: 'https://zclzone.github.io/vue-naive-admin-docs',
|
||||
// meta: {
|
||||
// title: '文档 - vuepress',
|
||||
// icon: 'mdi:vuejs',
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
]
|
||||
|
||||
export const NOT_FOUND_ROUTE = {
|
||||
|
||||
Reference in New Issue
Block a user