feat(路由): 添加欢迎页面路由及相关组件
添加新的欢迎页面路由配置,创建欢迎页面组件及样式文件
修改登录成功后默认跳转路径至欢迎页面
| | |
| | | |
| | | export default [ |
| | | { |
| | | path: '/Welcome', |
| | | routes: [ |
| | | { |
| | | name: 'Welcome', |
| | | path: '/Welcome', |
| | | hideInMenu: true, |
| | | component: './welco', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | "path": "/login", |
| | | "layout": false, |
| | | "routes": [ |
| | |
| | | message.success(defaultLoginSuccessMessage); |
| | | const urlParams = new URL(window.location.href).searchParams; |
| | | setTimeout(() => { |
| | | history.push(urlParams.get('redirect') || '/'); |
| | | history.push(urlParams.get('redirect') || '/Welcome'); |
| | | }, 0); |
| | | }; |
| | | |
| New file |
| | |
| | | import { PageContainer } from '@ant-design/pro-components'; |
| | | import './index.less' |
| | | |
| | | const SystemSettings = () => { |
| | | return ( |
| | | <PageContainer title={' '} className={'weclome'}> |
| | | <img src={require('../../../public/logo/welcome.png')} style={{ width: "100%", height: "calc(100vh - 120px)" }} /> |
| | | |
| | | </PageContainer> |
| | | ) |
| | | } |
| | | |
| | | export default SystemSettings |
| New file |
| | |
| | | .weclome{ |
| | | |
| | | .ant-page-header { |
| | | display: none; |
| | | } |
| | | .ant-pro-page-container-children-container { |
| | | padding: unset !important; |
| | | // padding-left: 15px; |
| | | // padding-right: 15px; |
| | | } |
| | | } |