fix: 样式修改

This commit is contained in:
2025-07-30 23:55:34 -07:00
parent c1aa738154
commit 816df42bc3
15 changed files with 310 additions and 331 deletions
@@ -4,17 +4,10 @@ import { Display } from '@/components/display';
import { Empty } from '@/components/empty';
import { ProList, ProListActions } from '@/components/pro-list';
import { closeOrder, queryOrderList } from '@/services/user/order';
import { Button, buttonVariants } from '@workspace/ui/components/button';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@workspace/ui/components/card';
import { Button } from '@workspace/ui/components/button';
import { Card, CardContent } from '@workspace/ui/components/card';
import { formatDate } from '@workspace/ui/utils';
import { useTranslations } from 'next-intl';
import Link from 'next/link';
import { useRef } from 'react';
export default function Page() {
@@ -33,26 +26,20 @@ export default function Page() {
}}
renderItem={(item) => {
return (
<Card className='overflow-hidden'>
<CardHeader className='bg-muted/50 flex flex-row items-center justify-between gap-2 space-y-0 p-3'>
<CardTitle>
{t('orderNo')}
<p className='text-sm'>{item.order_no}</p>
</CardTitle>
<CardDescription className='flex gap-2'>
<Card className='rounded-[32px] border border-[#D9D9D9] px-3 pb-5 pt-3 shadow-[0px_0px_4.5px_0px_rgba(0,0,0,0.25)]'>
<div className={'flex justify-between'}>
<div>
<div className={'text-[#666]'}>{t('orderNo')}</div>
<p className='text-xs text-[#4D4D4D]'>{item.order_no}</p>
</div>
<div>
{item.status === 1 ? (
<>
<Link
key='payment'
href={`/payment?order_no=${item.order_no}`}
className={buttonVariants({ size: 'sm' })}
>
<Button className='min-w-[150px] rounded-full border-[#0F2C53] bg-[#0F2C53] px-[35px] py-[9px] text-center text-xl font-bold hover:bg-[#225BA9] hover:text-white'>
{t('payment')}
</Link>
</Button>
<Button
key='cancel'
size='sm'
variant='destructive'
className='min-w-[150px] rounded-full border-[#0F2C53] bg-[#0F2C53] px-[35px] py-[9px] text-center text-xl font-bold hover:bg-[#225BA9] hover:text-white'
onClick={async () => {
await closeOrder({ orderNo: item.order_no });
ref.current?.refresh();
@@ -62,35 +49,32 @@ export default function Page() {
</Button>
</>
) : (
<Link
key='detail'
href={`/payment?order_no=${item.order_no}`}
className={buttonVariants({ size: 'sm' })}
>
<Button className='min-w-[150px] rounded-full border-[#0F2C53] bg-[#0F2C53] px-[35px] py-[9px] text-center text-xl font-bold hover:bg-[#225BA9] hover:text-white'>
{t('detail')}
</Link>
</Button>
)}
</CardDescription>
</CardHeader>
</div>
</div>
<CardContent className='p-3 text-sm'>
<ul className='grid grid-cols-2 gap-3 *:flex *:flex-col lg:grid-cols-4'>
<li>
<span className='text-muted-foreground'>{t('name')}</span>
<span>{item.subscribe.name || t(`type.${item.type}`)}</span>
<span className='text-[#225BA9]'>{t('name')}</span>
<span className={'font-bold text-[#091B33]'}>
{item.subscribe.name || t(`type.${item.type}`)}
</span>
</li>
<li className='font-semibold'>
<span className='text-muted-foreground'>{t('paymentAmount')}</span>
<span className='text-[#225BA9]'>{t('paymentAmount')}</span>
<span>
<Display type='currency' value={item.amount} />
</span>
</li>
<li className='font-semibold'>
<span className='text-muted-foreground'>{t('status.0')}</span>
<span className='text-[#225BA9]'>{t('status.0')}</span>
<span>{t(`status.${item.status}`)}</span>
</li>
<li className='font-semibold'>
<span className='text-muted-foreground'>{t('createdAt')}</span>
<span className='text-[#225BA9]'>{t('createdAt')}</span>
<time>{formatDate(item.created_at)}</time>
</li>
</ul>