修复支付取消的调用和规定时间内更新订单支付状态
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import {DialogContent, DialogHeader, DialogTitle} from '@/components/ui/dialog'
|
||||
import {DialogClose, DialogContent, DialogHeader, DialogTitle} from '@/components/ui/dialog'
|
||||
import {Button} from '@/components/ui/button'
|
||||
import {Loader} from 'lucide-react'
|
||||
import {useState} from 'react'
|
||||
@@ -11,7 +11,7 @@ export function DesktopPayment(props: PaymentModalProps) {
|
||||
|
||||
const onSubmit = async () => {
|
||||
setLoading(true)
|
||||
await props.onConfirm?.()
|
||||
await props.onConfirm(true)
|
||||
setLoading(false)
|
||||
}
|
||||
|
||||
@@ -67,9 +67,11 @@ export function DesktopPayment(props: PaymentModalProps) {
|
||||
{loading && <Loader className="animate-spin mr-2"/>}
|
||||
已完成支付
|
||||
</Button>
|
||||
<Button theme="outline" onClick={() => props.onClose?.()}>
|
||||
关闭
|
||||
</Button>
|
||||
<DialogClose asChild>
|
||||
<Button theme="outline" onClick={() => props.onClose?.()}>
|
||||
关闭
|
||||
</Button>
|
||||
</DialogClose>
|
||||
</div>
|
||||
</div>
|
||||
</DialogContent>
|
||||
|
||||
Reference in New Issue
Block a user