飞牛fpk打包,新增一个初始化页面。用于飞牛fpk安装完成后初始配置
This commit is contained in:
@@ -16,7 +16,9 @@ interface NaviGuard {
|
||||
const loginGuard: NavigationGuard = function (to, from) {
|
||||
// console.log('Authorization', http.checkAuthorization())
|
||||
const account = useAccountStore();
|
||||
if (!http.checkAuthorization() && !/^\/(login|home|init|mobile)?$/.test(to.fullPath)) {
|
||||
if (!http.checkAuthorization() && !/^\/(init|login|home|mobile)?$/.test(to.fullPath)) {
|
||||
console.log(123)
|
||||
console.log(to.fullPath)
|
||||
account.setLogged(false)
|
||||
return '/login';
|
||||
} else {
|
||||
|
||||
@@ -19,13 +19,26 @@ const routes: RouteRecordRaw[] = [
|
||||
name: 'mobile',
|
||||
redirect: '/mobile',
|
||||
meta: {
|
||||
title: '登录',
|
||||
title: '移动端首页',
|
||||
renderMenu: false,
|
||||
icon: 'CreditCardOutlined',
|
||||
},
|
||||
children: null,
|
||||
component: () => import('@/pages/mobile/MobileDashboard.vue'),
|
||||
},
|
||||
|
||||
{
|
||||
path: '/',
|
||||
name: 'init',
|
||||
redirect: '/init',
|
||||
meta: {
|
||||
title: '初始化',
|
||||
renderMenu: false,
|
||||
icon: 'CreditCardOutlined',
|
||||
},
|
||||
children: null,
|
||||
component: () => import('@/pages/desk/index.vue'),
|
||||
},
|
||||
// {
|
||||
// path: '/',
|
||||
// name: 'init',
|
||||
@@ -70,6 +83,18 @@ const routes: RouteRecordRaw[] = [
|
||||
children: null,
|
||||
component: () => import('@/pages/mobile/MobileDashboard.vue'),
|
||||
},
|
||||
{
|
||||
path: '/init',
|
||||
name: 'init',
|
||||
meta: {
|
||||
icon: 'LoginOutlined',
|
||||
view: 'blank',
|
||||
target: '_blank',
|
||||
cacheable: false,
|
||||
},
|
||||
children: null,
|
||||
component: () => import('@/pages/desk/index.vue'),
|
||||
},
|
||||
// {
|
||||
// path: '/init',
|
||||
// name: '初始化',
|
||||
|
||||
Reference in New Issue
Block a user