Commit 7b2a9b23 authored by 王万里's avatar 王万里

feat: 易县登录

parent f7200cc6
...@@ -5,41 +5,41 @@ import { Helmet, HelmetProvider } from 'react-helmet-async'; ...@@ -5,41 +5,41 @@ import { Helmet, HelmetProvider } from 'react-helmet-async';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { useHistory, withRouter } from '@wisdom-utils/runtime'; import { useHistory, withRouter } from '@wisdom-utils/runtime';
import { actionCreators } from '@/containers/App/store'; import { actionCreators } from '@/containers/App/store';
import QRCode from 'qrcode.react';
import classnames from 'classnames';
import moment from 'moment';
import defaultSetting from '../../../../../../../config/defaultSetting'; import defaultSetting from '../../../../../../../config/defaultSetting';
import LoginAction from '../../../login'; import LoginAction from '../../../login';
import styles from './index.less'; import styles from './index.less';
import Account from '../../../js/useAccount'; import Account from '../../../js/useAccount';
import { defaultApp } from '../../../../../../micro'; import { defaultApp } from '../../../../../../micro';
import logoPng from './images/7.png' import logoPng from './images/7.png';
import qrcodePng from './images/1.png' import qrcodePng from './images/1.png';
import QRCode from 'qrcode.react';
import classnames from 'classnames';
import moment from 'moment';
const PopOvercontent = () =>{ const PopOvercontent = () => {
const qrcodes = window.globalConfig && window.globalConfig.qrcode; const qrcodes = window.globalConfig && window.globalConfig.qrcode;
if (qrcodes) { if (qrcodes) {
return <QRCode value={qrcodes}/>; return <QRCode value={qrcodes} />;
} }
return <span>手持APP下载未配置</span>; return <span>手持APP下载未配置</span>;
} };
const Login = forwardRef((props, _ref) => { const Login = forwardRef((props, _ref) => {
const sliVerify = useRef(); const sliVerify = useRef();
const loginFormRef = useRef(); const loginFormRef = useRef();
const formRef = useRef(null); const formRef = useRef(null);
const [status, setStatus] = useState('normal'); const [status, setStatus] = useState('normal');
const [autoLogin, setAutoLogin] = useState(false); const [autoLogin, setAutoLogin] = useState(false);
const [submitting, setSubmitting] = useState(false); const [submitting, setSubmitting] = useState(false);
const [type, setType] = useState('Account'); const [type, setType] = useState('Account');
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
const history = useHistory(); const history = useHistory();
const [action, setAction] = useState(() => new LoginAction(Object.assign({}, props, { history }), setVisible, false)); const [action, setAction] = useState(() => new LoginAction(Object.assign({}, props, { history }), setVisible, false));
const [dateObj, setDateObj] = useState({}) const [dateObj, setDateObj] = useState({});
const handleSubmit = values => { const handleSubmit = values => {
/* eslint-disable */ /* eslint-disable */
action && action &&
(type === 'Account' (type === 'Account'
? action.loginHandler(values.userName, values.password, null, autoLogin, sliVerify) ? action.loginHandler(values.userName, values.password, null, autoLogin, sliVerify)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment