feat: 修改样式

This commit is contained in:
2025-08-13 01:51:01 -07:00
parent 59d180075b
commit a918cdab68
11 changed files with 299 additions and 305 deletions
@@ -4,13 +4,12 @@ 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 { purchaseCheckout } from '@/services/user/portal';
import { AiroButton } from '@workspace/airo-ui/components/AiroButton';
import { Card, CardContent } from '@workspace/airo-ui/components/card';
import { formatDate } from '@workspace/airo-ui/utils';
import { useTranslations } from 'next-intl';
import Link from 'next/link';
import { useRef } from 'react';
import { toast } from 'sonner';
import OrderDetailDialog from './components/OrderDetailDialog';
export default function Page() {
@@ -19,19 +18,6 @@ export default function Page() {
const ref = useRef<ProListActions>(null);
const OrderDetailDialogRef = useRef<typeof OrderDetailDialog>(null);
const handlePayment = async (orderNo) => {
const data = await purchaseCheckout({
orderNo: orderNo,
returnUrl: window.location.href,
});
if (data.data?.type === 'url' && data.data.checkout_url) {
window.open(data.data.checkout_url, '_blank');
} else {
toast.success(t('paymentSuccess'));
ref?.current.reset();
}
};
return (
<div>
<ProList<API.OrderDetail, Record<string, unknown>>
@@ -63,14 +49,10 @@ export default function Page() {
>
{t('cancelOrder')}
</AiroButton>
<AiroButton
variant={'primary'}
className={'ml-2'}
onClick={() => {
handlePayment(item.order_no);
}}
>
{t('payment')}
<AiroButton variant={'primary'} className={'ml-2'} asChild>
<Link key='payment' href={`/payment?order_no=${item.order_no}`}>
{t('payment')}
</Link>
</AiroButton>
</>
) : (