feat: 增加 WA 二维码生成

2.0/wai-server
LiaoYijun 10 months ago
parent 068576a1c6
commit 43f07b1392

@ -1,5 +1,5 @@
import { useEffect, useCallback } from 'react'
import { Row, Col, Space, Descriptions, Avatar, Tag, Divider, List, App, Button, Flex, Select, Spin, Form, Typography, QRCode, Tooltip } from 'antd'
import { useEffect, useCallback, useState } from 'react'
import { Row, Col, Space, Input, Descriptions, Avatar, Tag, Divider, List, App, Button, Flex, Select, Spin, Form, Typography, QRCode, Tooltip } from 'antd'
import { UserOutlined, InfoCircleOutlined, ReloadOutlined, CheckCircleFilled } from '@ant-design/icons'
import useAuthStore from '@/stores/AuthStore'
@ -9,6 +9,8 @@ function Profile() {
const [loginUser, setWhatsAppBusiness] = useAuthStore((state) => [state.loginUser, state.setWhatsAppBusiness])
const [text, setText] = useState('')
useEffect(() => {
//
// throw new Error('💥 CABOOM 💥')
@ -182,7 +184,12 @@ function Profile() {
</Col>
<Col span={6}>
<Flex gap='middle' vertical justify={'center'} align={'center'}>
<QRCode size={264} value={'https://web.whatsapp.com/'} status='expired' statusRender={customStatusRender} />
<Input
placeholder=""
value={text}
onChange={(e) => setText(e.target.value)}
/>
<QRCode size={264} value={text} errorLevel='L' />
</Flex>
</Col>
</Row>

Loading…
Cancel
Save