飞牛fpk打包,新增一个初始化页面。用于飞牛fpk安装完成后初始配置

This commit is contained in:
jianzhichu
2025-12-27 11:44:30 +08:00
parent 44e3962093
commit cc6906ea63
32 changed files with 848 additions and 1710 deletions
+3 -1
View File
@@ -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 {
+26 -1
View File
@@ -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: '初始化',