import React from 'react'; import axios from 'axios'; import { Button, Form, Input } from 'antd'; import { history } from 'umi'; import { setSessionToken } from '@/utils/token'; import './index.less' interface IProps { } const onFinish = (values: any) => { console.log('Success:', values); const response: any = axios.get('/api/token').then((res) => res.data.data); const current = new Date(); const expireTime = current.setTime(current.getTime() + 1000 * 12 * 60 * 60); setSessionToken(response.token, response.token, expireTime); history.push('/'); }; const onFinishFailed = (errorInfo: any) => { console.log('Failed:', errorInfo); }; const Login: React.FC = ((): JSX.Element => { return
}); export default Login;