|
@@ -1,5 +1,5 @@
|
|
|
import { LockOutlined, UserOutlined } from '@ant-design/icons'
|
|
|
-import { Alert, message, Tabs } from 'antd'
|
|
|
+import { Alert, message } from 'antd'
|
|
|
import React, { useState } from 'react'
|
|
|
import ProForm, { ProFormCheckbox, ProFormText } from '@ant-design/pro-form'
|
|
|
import { useIntl, Link, history, FormattedMessage, SelectLang, useModel, useRequest } from 'umi'
|
|
@@ -34,7 +34,7 @@ const goto = () => {
|
|
|
const Login: React.FC = () => {
|
|
|
// const { setAuthToken } = useModel('user')
|
|
|
const [userLoginState, setUserLoginState] = useState<API.LoginResult>({})
|
|
|
- const [type, setType] = useState<string>('account')
|
|
|
+ const [type] = useState<string>('account')
|
|
|
const { initialState, setInitialState } = useModel('@@initialState')
|
|
|
|
|
|
const { run, loading } = useRequest(queryCurrentUser, {
|
|
@@ -42,7 +42,7 @@ const Login: React.FC = () => {
|
|
|
onSuccess: async result => {
|
|
|
setInitialState({
|
|
|
...initialState,
|
|
|
- currentUser: result.currentAccount
|
|
|
+ currentUser: result.currentUser
|
|
|
})
|
|
|
goto()
|
|
|
}
|
|
@@ -150,7 +150,8 @@ const Login: React.FC = () => {
|
|
|
}}
|
|
|
onFinish={async values => {
|
|
|
handleSubmit(values as API.LoginParams)
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
{/* <Tabs activeKey={type} onChange={setType}>
|
|
|
<Tabs.TabPane
|
|
|
key="account"
|
|
@@ -215,14 +216,16 @@ const Login: React.FC = () => {
|
|
|
<div
|
|
|
style={{
|
|
|
marginBottom: 24
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
<ProFormCheckbox noStyle name="autoLogin">
|
|
|
<FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
|
|
|
</ProFormCheckbox>
|
|
|
<a
|
|
|
style={{
|
|
|
float: 'right'
|
|
|
- }}>
|
|
|
+ }}
|
|
|
+ >
|
|
|
<FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
|
|
|
</a>
|
|
|
</div>
|