修复关闭订单后未返回到充值页面的问题

This commit is contained in:
2025-11-20 18:00:32 +08:00
parent 85d9ec09d4
commit 9f29e35b53
2 changed files with 6 additions and 6 deletions

View File

@@ -17,11 +17,13 @@ export function PaymentModal(props: PaymentModalProps) {
// 手动关闭时的处理
const handleClose = async () => {
try {
const req = {
const res = await payClose({
trade_no: props.inner_no,
method: props.method,
})
if (!res.success) {
throw new Error(res.message)
}
const res = await payClose(req)
}
catch (error) {
console.error('关闭订单失败:', error)

View File

@@ -118,8 +118,6 @@ export default function RechargeModal(props: RechargeModelProps) {
const handleClose = () => {
setTrade(undefined)
setOpen(false)
form.reset()
}
return (
@@ -215,8 +213,8 @@ export default function RechargeModal(props: RechargeModelProps) {
)}
</FormField>
<DialogFooter className="!flex !flex-row !justify-center">
<Button className="px-8 h-12 text-lg"></Button>
<DialogFooter>
<Button></Button>
</DialogFooter>
</Form>
</>