增加移动端,可以查看统计数据和日志
This commit is contained in:
@@ -16,7 +16,7 @@ interface NaviGuard {
|
||||
const loginGuard: NavigationGuard = function (to, from) {
|
||||
// console.log('Authorization', http.checkAuthorization())
|
||||
const account = useAccountStore();
|
||||
if (!http.checkAuthorization() && !/^\/(login|home|init)?$/.test(to.fullPath)) {
|
||||
if (!http.checkAuthorization() && !/^\/(login|home|init|mobile)?$/.test(to.fullPath)) {
|
||||
account.setLogged(false)
|
||||
return '/login';
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,18 @@ const routes: RouteRecordRaw[] = [
|
||||
children: null,
|
||||
component: () => import('@/pages/login'),
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
name: 'mobile',
|
||||
redirect: '/mobile',
|
||||
meta: {
|
||||
title: '登录',
|
||||
renderMenu: false,
|
||||
icon: 'CreditCardOutlined',
|
||||
},
|
||||
children: null,
|
||||
component: () => import('@/pages/mobile/MobileDashboard.vue'),
|
||||
},
|
||||
// {
|
||||
// path: '/',
|
||||
// name: 'init',
|
||||
@@ -26,6 +38,7 @@ const routes: RouteRecordRaw[] = [
|
||||
// children: null,
|
||||
// component: () => import('@/pages/init'),
|
||||
// },
|
||||
|
||||
{
|
||||
path: '/front',
|
||||
name: '前端',
|
||||
@@ -45,7 +58,18 @@ const routes: RouteRecordRaw[] = [
|
||||
},
|
||||
component: () => import('@/pages/login'),
|
||||
},
|
||||
|
||||
{
|
||||
path: '/mobile',
|
||||
name: 'mobile',
|
||||
meta: {
|
||||
icon: 'LoginOutlined',
|
||||
view: 'blank',
|
||||
target: '_blank',
|
||||
cacheable: false,
|
||||
},
|
||||
children: null,
|
||||
component: () => import('@/pages/mobile/MobileDashboard.vue'),
|
||||
},
|
||||
// {
|
||||
// path: '/init',
|
||||
// name: '初始化',
|
||||
|
||||
Reference in New Issue
Block a user