支付组件统一使用二维码展示

This commit is contained in:
2026-03-13 14:13:06 +08:00
parent 82bd8051d8
commit 2b77ea189b
16 changed files with 206 additions and 193 deletions

View File

@@ -6,7 +6,7 @@ import {Dialog} from '@/components/ui/dialog'
import {PaymentProps} from './type'
import {payClose} from '@/actions/resource'
import {useEffect} from 'react'
import {useRouter} from 'next/navigation'
import {UniversalDesktopPayment} from './universal-desktop-payment'
export type PaymentModalProps = {
onConfirm: (showFail: boolean) => Promise<void>
@@ -61,17 +61,13 @@ export function PaymentModal(props: PaymentModalProps) {
onOpenChange={(open) => {
if (!open) handleClose()
}}>
{props.platform === TradePlatform.Mobile ? (
<MobilePayment
{...props}
onClose={handleClose}
/>
) : (
<DesktopPayment
{...props}
onClose={handleClose}
/>
)}
{/* {props.platform === TradePlatform.Mobile
? <MobilePayment {...props} onClose={handleClose}/>
: <DesktopPayment {...props} onClose={handleClose}/>
} */}
<UniversalDesktopPayment {...props} onClose={handleClose}/>
</Dialog>
)
}