feat(projects): 迁移登录完成

This commit is contained in:
Soybean
2022-01-05 01:35:32 +08:00
parent f5a36a05cb
commit b93b80cb4b
54 changed files with 1679 additions and 260 deletions

View File

@ -1,4 +1,5 @@
// import { getLoginModuleRegExp } from '@/utils';
import { getLoginModuleRegExp } from '@/utils';
import type { LoginModuleKey } from '@/interface';
/** 固定的路由 */
const constantRoutes: AuthRoute.Route[] = [
@ -12,8 +13,14 @@ const constantRoutes: AuthRoute.Route[] = [
},
{
name: 'login',
path: '/login',
path: `/login/:module(${getLoginModuleRegExp()})?`,
component: 'blank',
props: route => {
const moduleType = (route.params.module as LoginModuleKey) || 'pwd-login';
return {
module: moduleType
};
},
meta: {
title: '登录',
single: true