|
|
|
@ -5,11 +5,11 @@ import { Link, connect, Dispatch } from 'umi'; |
|
|
|
import { StateType } from '@/models/login'; |
|
|
|
import { LoginParamsType } from '@/services/login'; |
|
|
|
import { ConnectState } from '@/models/connect'; |
|
|
|
import LoginFrom from './components/Login'; |
|
|
|
import LoginForm from './components/Login'; |
|
|
|
|
|
|
|
import styles from './style.less'; |
|
|
|
|
|
|
|
const { Tab, UserName, Password, Mobile, Captcha, Submit } = LoginFrom; |
|
|
|
const { Tab, UserName, Password, Mobile, Captcha, Submit } = LoginForm; |
|
|
|
interface LoginProps { |
|
|
|
dispatch: Dispatch; |
|
|
|
userLogin: StateType; |
|
|
|
@ -44,7 +44,7 @@ const Login: React.FC<LoginProps> = (props) => { |
|
|
|
}; |
|
|
|
return ( |
|
|
|
<div className={styles.main}> |
|
|
|
<LoginFrom activeKey={type} onTabChange={setType} onSubmit={handleSubmit}> |
|
|
|
<LoginForm activeKey={type} onTabChange={setType} onSubmit={handleSubmit}> |
|
|
|
<Tab key="account" tab="账户密码登录"> |
|
|
|
{status === 'error' && loginType === 'account' && !submitting && ( |
|
|
|
<LoginMessage content="账户或密码错误(admin/ant.design)" /> |
|
|
|
@ -125,7 +125,7 @@ const Login: React.FC<LoginProps> = (props) => { |
|
|
|
注册账户 |
|
|
|
</Link> |
|
|
|
</div> |
|
|
|
</LoginFrom> |
|
|
|
</LoginForm> |
|
|
|
</div> |
|
|
|
); |
|
|
|
}; |
|
|
|
|