feat: 删除图形验证码
This commit is contained in:
@@ -133,10 +133,11 @@
|
||||
}
|
||||
|
||||
.login_form {
|
||||
// height: 100%;
|
||||
// float: left;
|
||||
//height: 100%;
|
||||
//float: left;
|
||||
margin: 0;
|
||||
padding: 0 32px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.mp_tips {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
BarcodeOutlined,
|
||||
GithubOutlined,
|
||||
GitlabOutlined,
|
||||
LockOutlined,
|
||||
@@ -30,24 +29,8 @@ const iconStyles: CSSProperties = {
|
||||
}
|
||||
|
||||
export default observer(() => {
|
||||
// @ts-ignore
|
||||
const [generateMpRegCodeData, setGenerateMpRegCodeData] = useState<API.GenerateMpRegCode>({})
|
||||
const [form] = Form.useForm()
|
||||
// @ts-ignore
|
||||
const [base64Code, setBase64Code] = useState<API.GenerateBase64Code>({ data: '' })
|
||||
const [open, setOpen] = useState(false)
|
||||
const clickGetBase64CodeMethod = async () => {
|
||||
await getBase64CodeMethod()
|
||||
}
|
||||
const CodeImg = (
|
||||
<img
|
||||
src={'data:image/jpg;base64,' + base64Code.data}
|
||||
onClick={clickGetBase64CodeMethod}
|
||||
title='点击刷新'
|
||||
style={{ cursor: 'pointer', height: 40, width: 90 }}
|
||||
/>
|
||||
)
|
||||
const getBase64CodeMethod = async () => {}
|
||||
|
||||
const items = [
|
||||
{
|
||||
@@ -171,26 +154,26 @@ export default observer(() => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<ProFormText
|
||||
addonAfter={CodeImg}
|
||||
name='code'
|
||||
fieldProps={{
|
||||
size: 'large',
|
||||
prefix: <BarcodeOutlined className={'prefixIcon'} />,
|
||||
autoComplete: 'off',
|
||||
}}
|
||||
placeholder='请输入图形验证码'
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入图形验证码!',
|
||||
},
|
||||
{
|
||||
pattern: /^[a-zA-Z0-9]{5}$/,
|
||||
message: '图形验证码格式不正确',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
{/*<ProFormText*/}
|
||||
{/* addonAfter={CodeImg}*/}
|
||||
{/* name='code'*/}
|
||||
{/* fieldProps={{*/}
|
||||
{/* size: 'large',*/}
|
||||
{/* prefix: <BarcodeOutlined className={'prefixIcon'} />,*/}
|
||||
{/* autoComplete: 'off',*/}
|
||||
{/* }}*/}
|
||||
{/* placeholder='请输入图形验证码'*/}
|
||||
{/* rules={[*/}
|
||||
{/* {*/}
|
||||
{/* required: true,*/}
|
||||
{/* message: '请输入图形验证码!',*/}
|
||||
{/* },*/}
|
||||
{/* {*/}
|
||||
{/* pattern: /^[a-zA-Z0-9]{5}$/,*/}
|
||||
{/* message: '图形验证码格式不正确',*/}
|
||||
{/* },*/}
|
||||
{/* ]}*/}
|
||||
{/*/>*/}
|
||||
</>
|
||||
)}
|
||||
{loginType === 'phone' && (
|
||||
@@ -214,26 +197,26 @@ export default observer(() => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<ProFormText
|
||||
addonAfter={CodeImg}
|
||||
name='code'
|
||||
fieldProps={{
|
||||
size: 'large',
|
||||
prefix: <BarcodeOutlined className={'prefixIcon'} />,
|
||||
autoComplete: 'off',
|
||||
}}
|
||||
placeholder='请输入图形验证码'
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入图形验证码!',
|
||||
},
|
||||
{
|
||||
pattern: /^[a-zA-Z0-9]{5}$/,
|
||||
message: '图形验证码格式不正确',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
{/*<ProFormText*/}
|
||||
{/* addonAfter={CodeImg}*/}
|
||||
{/* name='code'*/}
|
||||
{/* fieldProps={{*/}
|
||||
{/* size: 'large',*/}
|
||||
{/* prefix: <BarcodeOutlined className={'prefixIcon'} />,*/}
|
||||
{/* autoComplete: 'off',*/}
|
||||
{/* }}*/}
|
||||
{/* placeholder='请输入图形验证码'*/}
|
||||
{/* rules={[*/}
|
||||
{/* {*/}
|
||||
{/* required: true,*/}
|
||||
{/* message: '请输入图形验证码!',*/}
|
||||
{/* },*/}
|
||||
{/* {*/}
|
||||
{/* pattern: /^[a-zA-Z0-9]{5}$/,*/}
|
||||
{/* message: '图形验证码格式不正确',*/}
|
||||
{/* },*/}
|
||||
{/* ]}*/}
|
||||
{/*/>*/}
|
||||
<ProFormCaptcha
|
||||
fieldProps={{
|
||||
size: 'large',
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { BarcodeOutlined, LockOutlined, MobileOutlined, WechatOutlined } from '@ant-design/icons'
|
||||
import { LockOutlined, MobileOutlined, WechatOutlined } from '@ant-design/icons'
|
||||
import { ProFormCaptcha, ProFormText } from '@ant-design/pro-components'
|
||||
import { Space, Tabs, message, Image, Alert, Form, Button } from 'antd'
|
||||
import { useState } from 'react'
|
||||
@@ -12,25 +12,7 @@ import FooterComponent from '@/components/Footer'
|
||||
type LoginType = 'phone'
|
||||
|
||||
export default observer(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error
|
||||
const [generateMpRegCodeData, setGenerateMpRegCodeData] = useState<API.GenerateMpRegCode>({})
|
||||
const [form] = Form.useForm()
|
||||
// @ts-ignore
|
||||
const [base64Code, setBase64Code] = useState<API.GenerateBase64Code>({ data: '' })
|
||||
const clickGetBase64CodeMethod = async () => {
|
||||
await getBase64CodeMethod()
|
||||
}
|
||||
const CodeImg = (
|
||||
<img
|
||||
src={'data:image/jpg;base64,' + base64Code.data}
|
||||
onClick={clickGetBase64CodeMethod}
|
||||
title='点击刷新'
|
||||
style={{ cursor: 'pointer', height: 40, width: 90 }}
|
||||
/>
|
||||
)
|
||||
const getBase64CodeMethod = async () => {}
|
||||
|
||||
const items = [
|
||||
{
|
||||
key: 'phone',
|
||||
@@ -175,28 +157,6 @@ export default observer(() => {
|
||||
}),
|
||||
]}
|
||||
/>
|
||||
|
||||
<ProFormText
|
||||
addonAfter={CodeImg}
|
||||
name='code'
|
||||
fieldProps={{
|
||||
size: 'large',
|
||||
prefix: <BarcodeOutlined className={'prefixIcon'} />,
|
||||
autoComplete: 'off',
|
||||
}}
|
||||
placeholder='请输入图形验证码'
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入图形验证码!',
|
||||
},
|
||||
{
|
||||
pattern: /^[a-zA-Z0-9]{5}$/,
|
||||
message: '图形验证码格式不正确!',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
<ProFormCaptcha
|
||||
fieldProps={{
|
||||
size: 'large',
|
||||
|
Reference in New Issue
Block a user