|
|
|
@ -10,25 +10,78 @@ import {
|
|
|
|
|
List,
|
|
|
|
|
Result,
|
|
|
|
|
Button,
|
|
|
|
|
Image,
|
|
|
|
|
Flex,
|
|
|
|
|
Select,
|
|
|
|
|
Spin,
|
|
|
|
|
Form,
|
|
|
|
|
Typography,
|
|
|
|
|
QRCode,
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import { UserOutlined } from '@ant-design/icons'
|
|
|
|
|
import {
|
|
|
|
|
UserOutlined,
|
|
|
|
|
InfoCircleOutlined,
|
|
|
|
|
CloseCircleFilled,
|
|
|
|
|
ReloadOutlined,
|
|
|
|
|
CheckCircleFilled,
|
|
|
|
|
} from '@ant-design/icons'
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore'
|
|
|
|
|
|
|
|
|
|
function Profile() {
|
|
|
|
|
const loginUser = useAuthStore((state) => state.loginUser)
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
console.info(loginUser)
|
|
|
|
|
// 测试错误捕获:
|
|
|
|
|
// throw new Error('💥 CABOOM 💥')
|
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
const customStatusRender = (info) => {
|
|
|
|
|
switch (info.status) {
|
|
|
|
|
case 'expired':
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<CloseCircleFilled
|
|
|
|
|
style={{
|
|
|
|
|
color: 'red',
|
|
|
|
|
}}
|
|
|
|
|
/>{' '}
|
|
|
|
|
{info.locale?.expired}
|
|
|
|
|
<p>
|
|
|
|
|
<Button type='link' onClick={info.onRefresh}>
|
|
|
|
|
<ReloadOutlined /> {info.locale?.refresh}
|
|
|
|
|
</Button>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
case 'loading':
|
|
|
|
|
return (
|
|
|
|
|
<Space direction='vertical'>
|
|
|
|
|
<Spin />
|
|
|
|
|
<p>Loading...</p>
|
|
|
|
|
</Space>
|
|
|
|
|
)
|
|
|
|
|
case 'scanned':
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<CheckCircleFilled
|
|
|
|
|
style={{
|
|
|
|
|
color: 'green',
|
|
|
|
|
}}
|
|
|
|
|
/>{' '}
|
|
|
|
|
{info.locale?.scanned}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
default:
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={12} offset={6}>
|
|
|
|
|
<Descriptions title='个人资料' layout='vertical' column={2}>
|
|
|
|
|
<Col span={6} offset={6}>
|
|
|
|
|
<Descriptions title='个人资料' layout='vertical' column={1}>
|
|
|
|
|
<Descriptions.Item label='名字'>
|
|
|
|
|
<Space size='middle'>
|
|
|
|
|
<Avatar src={loginUser.avatarUrl}>
|
|
|
|
@ -49,84 +102,90 @@ function Profile() {
|
|
|
|
|
)
|
|
|
|
|
})}
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
<Descriptions.Item label='手机'>
|
|
|
|
|
{loginUser.mobile}
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
|
|
|
|
|
<Descriptions.Item label='商业号身份'>
|
|
|
|
|
<Space>
|
|
|
|
|
<Select
|
|
|
|
|
defaultValue='GH 顾问'
|
|
|
|
|
style={{
|
|
|
|
|
width: 200,
|
|
|
|
|
}}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: '18741256987',
|
|
|
|
|
label: 'GH 顾问(18741256987)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '13845214785',
|
|
|
|
|
label: 'GH 客服(13845214785)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '191477856351',
|
|
|
|
|
label: 'GH 客运(191477856351)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '0',
|
|
|
|
|
label: '国际事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '0',
|
|
|
|
|
label: 'CT 事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '0',
|
|
|
|
|
label: '花梨鹰事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
<Button type="primary">切换</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
<Form
|
|
|
|
|
layout='vertical'
|
|
|
|
|
// form={form}
|
|
|
|
|
>
|
|
|
|
|
<Form.Item
|
|
|
|
|
tooltip={{
|
|
|
|
|
title: '你所属的业务部门',
|
|
|
|
|
icon: <InfoCircleOutlined />,
|
|
|
|
|
}}>
|
|
|
|
|
<Select
|
|
|
|
|
defaultValue='8617607730395'
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: '8618174165365',
|
|
|
|
|
label: 'GH 客服(8618174165365)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '8617607730395',
|
|
|
|
|
label: 'GH 顾问(8617607730395)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '191477856351',
|
|
|
|
|
label: 'GH 客运(191477856351)',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '国际事业部',
|
|
|
|
|
label: '国际事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'CT 事业部',
|
|
|
|
|
label: 'CT 事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: '花梨鹰事业部',
|
|
|
|
|
label: '花梨鹰事业部(无)',
|
|
|
|
|
disabled: true,
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
<Form.Item>
|
|
|
|
|
<Button type='primary'>保存</Button>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Form>
|
|
|
|
|
</Descriptions.Item>
|
|
|
|
|
</Descriptions>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Divider orientation='left'></Divider>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={6} offset={6}>
|
|
|
|
|
{/* {loginUser.email} */}
|
|
|
|
|
<Col span={6}>
|
|
|
|
|
<List
|
|
|
|
|
header={<div>邮箱</div>}
|
|
|
|
|
dataSource={[
|
|
|
|
|
loginUser.email,
|
|
|
|
|
'christyluo@chinahighlights.com',
|
|
|
|
|
'christyluo@chinahighlights.net',
|
|
|
|
|
'christyluo@asiahighlights.com',
|
|
|
|
|
'christyluo@asiahighlights.net',
|
|
|
|
|
'christyluo@globalhighlights.com',
|
|
|
|
|
'christyluo@globalhighlights.net',
|
|
|
|
|
'christyluo@163.com',
|
|
|
|
|
]}
|
|
|
|
|
dataSource={loginUser.emailList}
|
|
|
|
|
renderItem={(item) => <List.Item>{item}</List.Item>}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Divider orientation='left'></Divider>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={6} offset={6}>
|
|
|
|
|
<Typography>
|
|
|
|
|
<Typography.Title level={2}>在系统上使用 WhatsApp</Typography.Title>
|
|
|
|
|
<Typography.Paragraph>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>在手机上打开 WhatsApp</li>
|
|
|
|
|
<li>点击“已关联的设备”,然后点击“关联新设备”</li>
|
|
|
|
|
<li>将手机对准屏幕扫描二维码</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</Typography.Paragraph>
|
|
|
|
|
</Typography>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={6}>
|
|
|
|
|
<Result
|
|
|
|
|
icon={
|
|
|
|
|
<Image
|
|
|
|
|
preview={false}
|
|
|
|
|
width={200}
|
|
|
|
|
src='https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png'
|
|
|
|
|
/>
|
|
|
|
|
}
|
|
|
|
|
title='登录成功'
|
|
|
|
|
extra={<Button type='primary'>退出账号</Button>}
|
|
|
|
|
/>
|
|
|
|
|
<Flex gap="middle" vertical justify={'center'} align={'center'}>
|
|
|
|
|
<QRCode
|
|
|
|
|
size={264}
|
|
|
|
|
value={'https://web.whatsapp.com/'}
|
|
|
|
|
status='scanned'
|
|
|
|
|
statusRender={customStatusRender}
|
|
|
|
|
/>
|
|
|
|
|
WhatsApp:8618754124786
|
|
|
|
|
<Button type='primary'>登出</Button>
|
|
|
|
|
</Flex>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</>
|
|
|
|
|