yangjie #49
|
|
@ -0,0 +1,48 @@
|
||||||
|
import ImageUrl from '@/utils/package/imageUrl';
|
||||||
|
import { Empty, Popover } from 'antd';
|
||||||
|
import { GetQrcode } from '@/api/Home/Index';
|
||||||
|
import { memo, useImperativeHandle, forwardRef, useState } from "react";
|
||||||
|
const Code = forwardRef((props: any, ref: any) => {
|
||||||
|
console.log(props);
|
||||||
|
useImperativeHandle(ref, () => ({
|
||||||
|
getData: () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
const [baseImage, setBaseImage] = useState('');
|
||||||
|
const [roomNum, setRoomNum] = useState(props.roomNum);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Popover
|
||||||
|
placement="bottom"
|
||||||
|
onOpenChange={(e: boolean) => {
|
||||||
|
setBaseImage('')
|
||||||
|
if (e) {
|
||||||
|
GetQrcode(roomNum, import.meta.env.VITE_ENV === 'development' ? 'trial' : 'release').then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
setBaseImage(res.data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
content={
|
||||||
|
baseImage ? <div>
|
||||||
|
<img style={{ width: '200px', margin: '0 auto' }} src={`data:image/png;base64,${baseImage}`} alt="" />
|
||||||
|
<div style={{ color: 'white', textAlign: 'center', fontSize: '16px', marginTop: '10px' }}>
|
||||||
|
<span>微信中长按图片识别小程序码</span><br />
|
||||||
|
<span>加入会议</span>
|
||||||
|
</div>
|
||||||
|
</div> : <div>
|
||||||
|
<Empty description={'二维码加载中,请稍后'} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div title='小程序'>
|
||||||
|
<img src={ImageUrl.icon55} alt="" style={{ width: '16px' }} />
|
||||||
|
</div>
|
||||||
|
</Popover>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
export default memo(Code)
|
||||||
|
|
@ -121,14 +121,6 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
>div:nth-child(2) {
|
|
||||||
cursor: pointer;
|
|
||||||
|
|
||||||
>img {
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
>div:nth-child(2) {
|
>div:nth-child(2) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import styles from '@/page/Home/Index/index.module.scss'
|
||||||
import { useEffect, useState, useRef } from "react";
|
import { useEffect, useState, useRef } from "react";
|
||||||
import Operation from '@/components/Operation';
|
import Operation from '@/components/Operation';
|
||||||
import { Button, Input, Modal, Pagination, Empty, message, Popover, Popconfirm, DatePicker, Select, Radio } from "antd";
|
import { Button, Input, Modal, Pagination, Empty, message, Popover, Popconfirm, DatePicker, Select, Radio } from "antd";
|
||||||
import { GetRoom, PostRoom, GetCheckoutRoomNum, GetRoomRtcToken, DeleteRoom, GetRecord, PostRoomInfo, GetQrcode } from '@/api/Home/Index';
|
import { GetRoom, PostRoom, GetCheckoutRoomNum, GetRoomRtcToken, DeleteRoom, GetRecord, PostRoomInfo } from '@/api/Home/Index';
|
||||||
import ImageUrl from '@/utils/package/imageUrl'
|
import ImageUrl from '@/utils/package/imageUrl'
|
||||||
import { ExclamationCircleFilled, ReloadOutlined } from '@ant-design/icons';
|
import { ExclamationCircleFilled, ReloadOutlined } from '@ant-design/icons';
|
||||||
import JoinSetting from '@/components/JoinSetting';
|
import JoinSetting from '@/components/JoinSetting';
|
||||||
|
|
@ -15,6 +15,7 @@ import StupWizard from '@/components/StupWizard';
|
||||||
import { GetSubDpList } from '@/api/Home/User';
|
import { GetSubDpList } from '@/api/Home/User';
|
||||||
import FeedBackModel from '@/components/FeedBackModel';
|
import FeedBackModel from '@/components/FeedBackModel';
|
||||||
import { PostHomeVerLog } from '@/api/Meeting';
|
import { PostHomeVerLog } from '@/api/Meeting';
|
||||||
|
import Code from '@/components/Code';
|
||||||
const { setInterval, clearInterval } = require('timers');
|
const { setInterval, clearInterval } = require('timers');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
|
|
@ -47,7 +48,6 @@ const Index: React.FC = () => {
|
||||||
const [timeData, setTimeData] = useState<any>([]);
|
const [timeData, setTimeData] = useState<any>([]);
|
||||||
const [isCreateRoom, setIsCreateRoom] = useState<boolean>(false);
|
const [isCreateRoom, setIsCreateRoom] = useState<boolean>(false);
|
||||||
const [allowAnonymous, setAllowAnonymous] = useState(true);
|
const [allowAnonymous, setAllowAnonymous] = useState(true);
|
||||||
const [baseImage, setBaseImage] = useState('');
|
|
||||||
const userInfo = JSON.parse(storage.getItem('user') as string)
|
const userInfo = JSON.parse(storage.getItem('user') as string)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setUser(userInfo)
|
setUser(userInfo)
|
||||||
|
|
@ -246,35 +246,7 @@ const Index: React.FC = () => {
|
||||||
<span>{item.roomNum}</span>
|
<span>{item.roomNum}</span>
|
||||||
<img src={ImageUrl.icon10} alt="" />
|
<img src={ImageUrl.icon10} alt="" />
|
||||||
</div>
|
</div>
|
||||||
<Popover
|
<Code roomNum={item.roomNum}></Code>
|
||||||
placement="bottom"
|
|
||||||
onOpenChange={(e: boolean) => {
|
|
||||||
setBaseImage('')
|
|
||||||
if (e) {
|
|
||||||
GetQrcode(item.roomNum, import.meta.env.VITE_ENV === 'development' ? 'trial' : 'release').then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
setBaseImage(res.data)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
content={
|
|
||||||
baseImage ? <div>
|
|
||||||
<img style={{ width: '200px', margin: '0 auto' }} src={`data:image/png;base64,${baseImage}`} alt="" />
|
|
||||||
<div style={{ color: 'white', textAlign: 'center', fontSize: '16px', marginTop: '10px' }}>
|
|
||||||
<span>微信中长按图片识别小程序码</span><br />
|
|
||||||
<span>加入会议</span>
|
|
||||||
</div>
|
|
||||||
</div> : <div>
|
|
||||||
<Empty description={'二维码加载中,请稍后'} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div title='小程序'>
|
|
||||||
<img src={ImageUrl.icon55} alt="" />
|
|
||||||
</div>
|
|
||||||
</Popover>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{role.ID.includes(userInfo.roleId) ? <Popover
|
{role.ID.includes(userInfo.roleId) ? <Popover
|
||||||
|
|
|
||||||
|
|
@ -444,8 +444,8 @@
|
||||||
color: white;
|
color: white;
|
||||||
border: 1px white solid;
|
border: 1px white solid;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
width: 30px;
|
width: 25px;
|
||||||
height: 30px;
|
height: 25px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import MeetingDisconnected from '@/components/MeetingDisconnected';
|
||||||
import SingIn from '@/components/SingIn';
|
import SingIn from '@/components/SingIn';
|
||||||
import UserName from '@/components/UserName';
|
import UserName from '@/components/UserName';
|
||||||
import { GetRoomRtcToken } from '@/api/Home/Index';
|
import { GetRoomRtcToken } from '@/api/Home/Index';
|
||||||
|
import Code from '@/components/Code';
|
||||||
const { setTimeout, setInterval, clearTimeout, clearInterval } = require('timers');
|
const { setTimeout, setInterval, clearTimeout, clearInterval } = require('timers');
|
||||||
const { confirm } = Modal;
|
const { confirm } = Modal;
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
|
|
@ -2644,7 +2645,9 @@ const Meeting: React.FC = () => {
|
||||||
</Popover>}
|
</Popover>}
|
||||||
<div>{changeCurrentSeconds()}</div>
|
<div>{changeCurrentSeconds()}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>会议号:{state.channelId} 会议名称:{state.roomName}</div>
|
<div style={{ display: 'flex', alignItems: 'center' }}>会议号:{state.channelId} 会议名称:{state.roomName}
|
||||||
|
<span className='drag' style={{ marginTop: '2px', marginLeft: '4px' }}><Code roomNum={state.channelId}></Code></span>
|
||||||
|
</div>
|
||||||
<div className='drag'>
|
<div className='drag'>
|
||||||
<Popover
|
<Popover
|
||||||
content={
|
content={
|
||||||
|
|
@ -2943,7 +2946,7 @@ const Meeting: React.FC = () => {
|
||||||
<div>
|
<div>
|
||||||
<div><Avatar name={item.userName} /></div>
|
<div><Avatar name={item.userName} /></div>
|
||||||
<span>
|
<span>
|
||||||
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: '80px' }} title={item.userName}>{item.userName}</span>{item.uid === user.uid ? '(我)' : ''}
|
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', maxWidth: role.ID.includes(item.roleId) || item.isRoomManager ? '50px' : '80px' }} title={item.userName}>{item.userName}</span>{item.uid === user.uid ? '(我)' : ''}
|
||||||
{role.ID.includes(item.roleId) || item.isRoomManager ?
|
{role.ID.includes(item.roleId) || item.isRoomManager ?
|
||||||
<span style={{ color: '#02B188', marginLeft: '4px' }}>
|
<span style={{ color: '#02B188', marginLeft: '4px' }}>
|
||||||
{role.ID.includes(item.roleId) ? '管理员' : '发言人'}
|
{role.ID.includes(item.roleId) ? '管理员' : '发言人'}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue