feat: 佣金提现和备注功能
This commit is contained in:
@@ -46,10 +46,14 @@ import { Icon } from '@workspace/airo-ui/custom-components/icon';
|
||||
import { cn } from '@workspace/airo-ui/lib/utils';
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import Image from 'next/image';
|
||||
import NextImage from 'next/legacy/image';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
import { PhotoProvider, PhotoView } from 'react-photo-view';
|
||||
import 'react-photo-view/dist/react-photo-view.css';
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('ticket');
|
||||
|
||||
@@ -178,13 +182,13 @@ export default function Page() {
|
||||
<CardDescription className='flex gap-2'>
|
||||
{item.status !== 4 ? (
|
||||
<>
|
||||
<AiroButton
|
||||
variant={'primary'}
|
||||
onClick={() => setTicketId(item.id)}
|
||||
className={'hidden sm:flex'}
|
||||
>
|
||||
{t('reply')}
|
||||
</AiroButton>
|
||||
{item.issue_type === 0 ? (
|
||||
<AiroButton
|
||||
variant={'primary'}
|
||||
onClick={() => setTicketId(item.id)}
|
||||
className={'hidden sm:flex'}
|
||||
/>
|
||||
) : null}
|
||||
<ConfirmButton
|
||||
key='close'
|
||||
trigger={
|
||||
@@ -228,7 +232,28 @@ export default function Page() {
|
||||
</li>
|
||||
<li className='order-2 sm:order-3'>
|
||||
<span className='font-normal text-[#225BA9]'>{t('description')}</span>
|
||||
<time className={'font-bold'}>{item.description}</time>
|
||||
<time className={'font-bold'}>
|
||||
{item?.description?.includes('data:image') ? (
|
||||
<div>
|
||||
<div>提现方式:{item?.description?.split('-')[0]}</div>
|
||||
<PhotoProvider>
|
||||
<PhotoView src={item?.description?.split('-')[1]}>
|
||||
<Image
|
||||
src={item?.description?.split('-')[1]}
|
||||
height={48}
|
||||
width={48}
|
||||
className={'mx-1 cursor-pointer border'}
|
||||
/>
|
||||
</PhotoView>
|
||||
</PhotoProvider>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<div>提现方式:{item?.description.split('-')[0]}</div>
|
||||
<div>提现地址: {item?.description.split('-')[1]}</div>
|
||||
</div>
|
||||
)}
|
||||
</time>
|
||||
</li>
|
||||
<li className=''>
|
||||
<span className='font-normal text-[#225BA9]'>{t('updatedAt')}</span>
|
||||
@@ -305,6 +330,7 @@ export default function Page() {
|
||||
from: 'User',
|
||||
type: 1,
|
||||
content: message,
|
||||
issue_type: 0,
|
||||
});
|
||||
refetchTicket();
|
||||
setMessage('');
|
||||
|
||||
Reference in New Issue
Block a user