import { durationFormat } from '@/services/utils'; import { IChatItem } from '../ChatLogsType'; import styles from './index.module.scss'; export const ChatVoiptext: React.FC = (props) => { function content() { try { // todo /// const msg = JSON.parse(props.chat?.content as string); // console.log(msg); return (
音视频通话 {durationFormat(msg.callduration)}
); } catch (_e) { return (
{props.chat?.content}
); } } return ( <> {props.from?.user_id == props.chat?.msg_from ? (
{props.from?.name}
{content()}
{props.from?.name[0]}
) : (
{props.to?.cust_info.name}
{content()}
)} ); };