flat: 扫码,未对接
This commit is contained in:
@@ -217,9 +217,9 @@ export async function render(oldRender: () => void) {
|
||||
const checkRegion = 5 * 60 * 1000;
|
||||
export const request = {
|
||||
...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: 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: [
|
||||
(url: any, options: { headers: any }) => {
|
||||
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';
|
||||
import { useEmotionCss } from '@ant-design/use-emotion-css';
|
||||
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 React, { useEffect, useState } from 'react';
|
||||
import { flushSync } from 'react-dom';
|
||||
// flushSync 允许你强制 React 同步刷新提供的回调中的任何更新。这确保了 DOM 立即更新
|
||||
import { clearSessionToken, setSessionToken } from '@/access';
|
||||
import logoImg from '@/assets/logo.svg';
|
||||
import login_imge2b033b1 from '@/assets/login_img.e2b033b1.png';
|
||||
|
||||
const ActionIcons = () => {
|
||||
const langClassName = useEmotionCss(({ token }) => {
|
||||
@@ -92,6 +93,7 @@ const Login: React.FC = () => {
|
||||
const { initialState, setInitialState } = useModel('@@initialState');
|
||||
const [captchaCode, setCaptchaCode] = useState<string>('');
|
||||
const [uuid, setUuid] = useState<string>('');
|
||||
const [qrcodeVal, setQrcodeVal] = useState<string>('7655212');
|
||||
|
||||
const containerClassName = useEmotionCss(() => {
|
||||
return {
|
||||
@@ -192,7 +194,8 @@ const Login: React.FC = () => {
|
||||
minWidth: 280,
|
||||
maxWidth: '75vw',
|
||||
}}
|
||||
logo={<img alt="logo" src={logoImg} />}
|
||||
submitter={type === 'scanQode' ? false : true}
|
||||
// logo={<img alt="logo" src={logoImg} />}
|
||||
title="青岛智慧就业服务系统"
|
||||
// subTitle={intl.formatMessage({ id: 'pages.layouts.userLayout.title' })}
|
||||
initialValues={{
|
||||
@@ -222,6 +225,10 @@ const Login: React.FC = () => {
|
||||
defaultMessage: '账户密码登录',
|
||||
}),
|
||||
},
|
||||
{
|
||||
key: 'scanQode',
|
||||
label: '社保卡扫码登录',
|
||||
},
|
||||
// {
|
||||
// key: 'mobile',
|
||||
// label: intl.formatMessage({
|
||||
@@ -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' && (
|
||||
<>
|
||||
<ProFormText
|
||||
@@ -413,6 +437,7 @@ const Login: React.FC = () => {
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{type !== 'scanQode' && (
|
||||
<div
|
||||
style={{
|
||||
marginBottom: 24,
|
||||
@@ -429,6 +454,7 @@ const Login: React.FC = () => {
|
||||
<FormattedMessage id="pages.login.forgotPassword" defaultMessage="忘记密码" />
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</LoginForm>
|
||||
</div>
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user