feat: 添加登录模板页面

This commit is contained in:
landaiqing
2024-07-10 14:06:17 +08:00
parent cba745729f
commit 69ad5b0c55
4 changed files with 14 additions and 4 deletions

View File

@@ -11,11 +11,18 @@ export default defineConfig({
layout: {
title: '五味子云存储',
},
base: '/',
browserslist: ['> 1%', 'last 2 versions'],
routes: [
{
path: '/',
redirect: '/login',
},
{
path: '/login',
layout: false,
component: './Login',
},
{
name: '首页',
path: '/home',

View File

@@ -2,13 +2,14 @@
// 全局初始化数据配置,用于 Layout 用户信息和权限初始化
// 更多信息见文档https://umijs.org/docs/api/runtime-config#getinitialstate
import logo from '@/assets/images/logo.png';
export async function getInitialState(): Promise<{ name: string }> {
return { name: '@umijs/max' };
return { name: '五味子云存储' };
}
export const layout = () => {
return {
logo: 'https://img.alicdn.com/tfs/TB1YHEpwUT1gK0jSZFhXXaAtVXa-28-27.svg',
logo: logo,
menu: {
locale: false,
},

View File

@@ -2,6 +2,7 @@ import Guide from '@/components/Guide';
import { trim } from '@/utils/format';
import { PageContainer } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import React from 'react';
import styles from './index.less';
const HomePage: React.FC = () => {

View File

@@ -17,7 +17,7 @@ import {
} from '@ant-design/pro-components';
import { Divider, Space, Tabs, message } from 'antd';
import type { CSSProperties } from 'react';
import { useState } from 'react';
import React, { useState } from 'react';
import { history } from 'umi';
type LoginType = 'phone' | 'account';
const iconStyles: CSSProperties = {
@@ -26,7 +26,7 @@ const iconStyles: CSSProperties = {
verticalAlign: 'middle',
cursor: 'pointer',
};
export default () => {
const Login: React.FC = () => {
// console.log(name);
const items = [
{ label: '账户密码登录', key: 'account' },
@@ -249,3 +249,4 @@ export default () => {
</div>
);
};
export default Login;