feat: 删除图形验证码
This commit is contained in:
@@ -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