|
@ -2,8 +2,8 @@ import { Footer } from '@/components'; |
|
|
import { adminLogin as login } from '@/services/matrix/admin'; |
|
|
import { adminLogin as login } from '@/services/matrix/admin'; |
|
|
import { LockOutlined, UserOutlined } from '@ant-design/icons'; |
|
|
import { LockOutlined, UserOutlined } from '@ant-design/icons'; |
|
|
import { LoginForm, ProFormCheckbox, ProFormText } from '@ant-design/pro-components'; |
|
|
import { LoginForm, ProFormCheckbox, ProFormText } from '@ant-design/pro-components'; |
|
|
import { FormattedMessage, Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max'; |
|
|
import { FormattedMessage, Helmet, SelectLang, history, useIntl, useModel } from '@umijs/max'; |
|
|
import { message, Tabs } from 'antd'; |
|
|
import { Tabs, message } from 'antd'; |
|
|
import { createStyles } from 'antd-style'; |
|
|
import { createStyles } from 'antd-style'; |
|
|
import React, { useState } from 'react'; |
|
|
import React, { useState } from 'react'; |
|
|
import { flushSync } from 'react-dom'; |
|
|
import { flushSync } from 'react-dom'; |
|
@ -86,8 +86,9 @@ const Login: React.FC = () => { |
|
|
}); |
|
|
}); |
|
|
message.success(defaultLoginSuccessMessage); |
|
|
message.success(defaultLoginSuccessMessage); |
|
|
await fetchUserInfo(); |
|
|
await fetchUserInfo(); |
|
|
const urlParams = new URL(window.location.href).searchParams; |
|
|
// const urlParams = new URL(window.location.href).searchParams;
|
|
|
history.push(urlParams.get('redirect') || '/'); |
|
|
// history.push(urlParams.get('redirect') || '/');
|
|
|
|
|
|
history.push('/'); |
|
|
// 如果失败去设置用户错误信息
|
|
|
// 如果失败去设置用户错误信息
|
|
|
// setUserLoginState(msg);
|
|
|
// setUserLoginState(msg);
|
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|