fix: login & register

This commit is contained in:
chenos 2021-03-22 08:56:58 +08:00
parent 613acb2652
commit 6c76d27cd3
2 changed files with 4 additions and 10 deletions

View File

@ -4,6 +4,7 @@ import { Page } from '@/components/pages';
import ViewFactory from '@/components/views'; import ViewFactory from '@/components/views';
import { Helmet, useModel } from 'umi'; import { Helmet, useModel } from 'umi';
import get from 'lodash/get'; import get from 'lodash/get';
import { Login } from '@/components/views/Form/Login';
export default (props: any) => { export default (props: any) => {
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState'); const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
@ -13,11 +14,7 @@ export default (props: any) => {
<Helmet> <Helmet>
<title>{siteTitle ? `登录 - ${siteTitle}` : '登录'}</title> <title>{siteTitle ? `登录 - ${siteTitle}` : '登录'}</title>
</Helmet> </Helmet>
<ViewFactory <Login {...props}/>
{...props}
viewName={'login'}
resourceName={'users'}
/>
</div> </div>
); );
}; };

View File

@ -4,6 +4,7 @@ import { Page } from '@/components/pages';
import ViewFactory from '@/components/views'; import ViewFactory from '@/components/views';
import { Helmet, useModel } from 'umi'; import { Helmet, useModel } from 'umi';
import get from 'lodash/get'; import get from 'lodash/get';
import { Register } from '@/components/views/Form/Register';
export default (props: any) => { export default (props: any) => {
const { initialState = {}, refresh, setInitialState } = useModel('@@initialState'); const { initialState = {}, refresh, setInitialState } = useModel('@@initialState');
@ -13,11 +14,7 @@ export default (props: any) => {
<Helmet> <Helmet>
<title>{siteTitle ? `注册 - ${siteTitle}` : '注册'}</title> <title>{siteTitle ? `注册 - ${siteTitle}` : '注册'}</title>
</Helmet> </Helmet>
<ViewFactory <Register {...props}/>
{...props}
viewName={'register'}
resourceName={'users'}
/>
</div> </div>
); );
}; };