feat: 修改样式

This commit is contained in:
2025-08-12 02:58:18 -07:00
parent cc522d0754
commit 265519a03d
13 changed files with 567 additions and 648 deletions
+1 -1
View File
@@ -109,11 +109,11 @@ const Purchase = forwardRef<PurchaseDialogRef, PurchaseProps>((props, ref) => {
const response = await purchase(params as API.PurchaseOrderRequest);
const orderNo = response.data.data?.order_no;
if (orderNo) {
await getUserInfo();
const data = await purchaseCheckout({
orderNo: orderNo,
returnUrl: window.location.href,
});
await getUserInfo();
if (data.data?.type === 'url' && data.data.checkout_url) {
window.open(data.data.checkout_url, '_blank');
} else {
+27 -24
View File
@@ -3,7 +3,7 @@
import useGlobalStore from '@/config/use-global';
import { recharge } from '@/services/user/order';
import { AiroButton } from '@workspace/airo-ui/components/AiroButton';
import { Button, ButtonProps } from '@workspace/airo-ui/components/button';
import { ButtonProps } from '@workspace/airo-ui/components/button';
import {
Dialog,
DialogContent,
@@ -43,13 +43,13 @@ export default function Recharge(props: Readonly<ButtonProps>) {
</DialogTrigger>
<DialogContent className='flex h-full flex-col overflow-hidden md:h-auto'>
<DialogHeader>
<DialogTitle>{t('balanceRecharge')}</DialogTitle>
<DialogTitle className={'text-4xl'}>{t('balanceRecharge')}</DialogTitle>
<DialogDescription>{t('rechargeDescription')}</DialogDescription>
</DialogHeader>
<div className='flex flex-col justify-between text-sm'>
<div className='mt-8 flex flex-col justify-between text-sm'>
<div className='grid gap-3'>
<div className='font-semibold'>{t('rechargeAmount')}</div>
<div className='flex'>
<div className='mb-8 flex'>
<EnhancedInput
type='number'
placeholder={t('enterAmount')}
@@ -73,27 +73,30 @@ export default function Recharge(props: Readonly<ButtonProps>) {
onChange={(value) => setParams({ ...params, payment: value })}
/>
</div>
<Button
className='fixed bottom-0 left-0 w-full rounded-none md:relative md:mt-6'
disabled={loading || !params.amount}
onClick={() => {
startTransition(async () => {
try {
const response = await recharge(params);
const orderNo = response.data.data?.order_no;
if (orderNo) {
router.push(`/payment?order_no=${orderNo}`);
setOpen(false);
<div className={'flex items-center justify-center'}>
<AiroButton
variant={'primary'}
className='fixed bottom-0 left-0 md:relative md:mt-6'
disabled={loading || !params.amount}
onClick={() => {
startTransition(async () => {
try {
const response = await recharge(params);
const orderNo = response.data.data?.order_no;
if (orderNo) {
router.push(`/payment?order_no=${orderNo}`);
setOpen(false);
}
} catch (error) {
/* empty */
}
} catch (error) {
/* empty */
}
});
}}
>
{loading && <LoaderCircle className='mr-2 animate-spin' />}
{t('rechargeNow')}
</Button>
});
}}
>
{loading && <LoaderCircle className='mr-2 animate-spin' />}
{t('rechargeNow')}
</AiroButton>
</div>
</div>
</DialogContent>
</Dialog>