flat: 扫码,未对接
This commit is contained in:
@@ -217,9 +217,9 @@ export async function render(oldRender: () => void) {
|
|||||||
const checkRegion = 5 * 60 * 1000;
|
const checkRegion = 5 * 60 * 1000;
|
||||||
export const request = {
|
export const request = {
|
||||||
...errorConfig,
|
...errorConfig,
|
||||||
// baseURL: process.env.NODE_ENV === 'development' ? '' : 'https://qd.zhaopinzao8dian.com/api',
|
baseURL: process.env.NODE_ENV === 'development' ? '' : 'https://qd.zhaopinzao8dian.com/api',
|
||||||
// baseURL: 'http://39.98.44.136:8080',
|
// baseURL: 'http://39.98.44.136:8080',
|
||||||
baseURL: process.env.NODE_ENV === 'development' ? '' : 'http://10.213.6.207:19010/api',
|
// baseURL: process.env.NODE_ENV === 'development' ? '' : 'http://10.213.6.207:19010/api',
|
||||||
requestInterceptors: [
|
requestInterceptors: [
|
||||||
(url: any, options: { headers: any }) => {
|
(url: any, options: { headers: any }) => {
|
||||||
const headers = options.headers ? options.headers : [];
|
const headers = options.headers ? options.headers : [];
|
||||||
|
|||||||
BIN
src/assets/login_img.e2b033b1.png
Normal file
BIN
src/assets/login_img.e2b033b1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
@@ -17,13 +17,14 @@ import {
|
|||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { useEmotionCss } from '@ant-design/use-emotion-css';
|
import { useEmotionCss } from '@ant-design/use-emotion-css';
|
||||||
import { FormattedMessage, Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max';
|
import { FormattedMessage, Helmet, history, SelectLang, useIntl, useModel } from '@umijs/max';
|
||||||
import { Alert, Col, Image, message, Row, Tabs } from 'antd';
|
import { Alert, Col, Image, message, Row, Tabs, QRCode } from 'antd';
|
||||||
import Settings from '../../../../config/defaultSettings';
|
import Settings from '../../../../config/defaultSettings';
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { flushSync } from 'react-dom';
|
import { flushSync } from 'react-dom';
|
||||||
// flushSync 允许你强制 React 同步刷新提供的回调中的任何更新。这确保了 DOM 立即更新
|
// flushSync 允许你强制 React 同步刷新提供的回调中的任何更新。这确保了 DOM 立即更新
|
||||||
import { clearSessionToken, setSessionToken } from '@/access';
|
import { clearSessionToken, setSessionToken } from '@/access';
|
||||||
import logoImg from '@/assets/logo.svg';
|
import logoImg from '@/assets/logo.svg';
|
||||||
|
import login_imge2b033b1 from '@/assets/login_img.e2b033b1.png';
|
||||||
|
|
||||||
const ActionIcons = () => {
|
const ActionIcons = () => {
|
||||||
const langClassName = useEmotionCss(({ token }) => {
|
const langClassName = useEmotionCss(({ token }) => {
|
||||||
@@ -92,6 +93,7 @@ const Login: React.FC = () => {
|
|||||||
const { initialState, setInitialState } = useModel('@@initialState');
|
const { initialState, setInitialState } = useModel('@@initialState');
|
||||||
const [captchaCode, setCaptchaCode] = useState<string>('');
|
const [captchaCode, setCaptchaCode] = useState<string>('');
|
||||||
const [uuid, setUuid] = useState<string>('');
|
const [uuid, setUuid] = useState<string>('');
|
||||||
|
const [qrcodeVal, setQrcodeVal] = useState<string>('7655212');
|
||||||
|
|
||||||
const containerClassName = useEmotionCss(() => {
|
const containerClassName = useEmotionCss(() => {
|
||||||
return {
|
return {
|
||||||
@@ -192,7 +194,8 @@ const Login: React.FC = () => {
|
|||||||
minWidth: 280,
|
minWidth: 280,
|
||||||
maxWidth: '75vw',
|
maxWidth: '75vw',
|
||||||
}}
|
}}
|
||||||
logo={<img alt="logo" src={logoImg} />}
|
submitter={type === 'scanQode' ? false : true}
|
||||||
|
// logo={<img alt="logo" src={logoImg} />}
|
||||||
title="青岛智慧就业服务系统"
|
title="青岛智慧就业服务系统"
|
||||||
// subTitle={intl.formatMessage({ id: 'pages.layouts.userLayout.title' })}
|
// subTitle={intl.formatMessage({ id: 'pages.layouts.userLayout.title' })}
|
||||||
initialValues={{
|
initialValues={{
|
||||||
@@ -222,6 +225,10 @@ const Login: React.FC = () => {
|
|||||||
defaultMessage: '账户密码登录',
|
defaultMessage: '账户密码登录',
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'scanQode',
|
||||||
|
label: '社保卡扫码登录',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// key: 'mobile',
|
// key: 'mobile',
|
||||||
// label: intl.formatMessage({
|
// label: intl.formatMessage({
|
||||||
@@ -232,7 +239,7 @@ const Login: React.FC = () => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/*{code !== 200 && loginType === 'account' && (*/}
|
{/* {code !== 200 && loginType === 'account' && ( */}
|
||||||
{/* <LoginMessage*/}
|
{/* <LoginMessage*/}
|
||||||
{/* content={intl.formatMessage({*/}
|
{/* content={intl.formatMessage({*/}
|
||||||
{/* id: 'pages.login.accountLogin.errorMessage',*/}
|
{/* id: 'pages.login.accountLogin.errorMessage',*/}
|
||||||
@@ -240,6 +247,23 @@ const Login: React.FC = () => {
|
|||||||
{/* })}*/}
|
{/* })}*/}
|
||||||
{/* />*/}
|
{/* />*/}
|
||||||
{/*)}*/}
|
{/*)}*/}
|
||||||
|
|
||||||
|
{type === 'scanQode' && (
|
||||||
|
<>
|
||||||
|
<Row>
|
||||||
|
<Col offset={1}>
|
||||||
|
<QRCode
|
||||||
|
errorLevel="H"
|
||||||
|
size={300}
|
||||||
|
iconSize={300 / 5}
|
||||||
|
value="https://ant.design/"
|
||||||
|
icon={login_imge2b033b1}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{type === 'account' && (
|
{type === 'account' && (
|
||||||
<>
|
<>
|
||||||
<ProFormText
|
<ProFormText
|
||||||
@@ -413,22 +437,24 @@ const Login: React.FC = () => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div
|
{type !== 'scanQode' && (
|
||||||
style={{
|
<div
|
||||||
marginBottom: 24,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ProFormCheckbox noStyle name="autoLogin">
|
|
||||||
<FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
|
|
||||||
</ProFormCheckbox>
|
|
||||||
<a
|
|
||||||
style={{
|
style={{
|
||||||
float: 'right',
|
marginBottom: 24,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
|
<ProFormCheckbox noStyle name="autoLogin">
|
||||||
</a>
|
<FormattedMessage id="pages.login.rememberMe" defaultMessage="自动登录" />
|
||||||
</div>
|
</ProFormCheckbox>
|
||||||
|
<a
|
||||||
|
style={{
|
||||||
|
float: 'right',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</LoginForm>
|
</LoginForm>
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
Reference in New Issue
Block a user