取消关闭支付弹窗调用关闭订单接口 & 添加未实名去支付时的拦截

This commit is contained in:
Eamon-meng
2026-04-20 16:22:49 +08:00
parent 74d53c619d
commit 27e694ee0d
3 changed files with 41 additions and 25 deletions

View File

@@ -17,21 +17,21 @@ export type PaymentModalProps = {
export function PaymentModal(props: PaymentModalProps) {
// 手动关闭时的处理
const handleClose = async () => {
try {
const res = await payClose({
trade_no: props.inner_no,
method: props.method,
})
if (!res.success) {
throw new Error(res.message)
}
}
catch (error) {
console.error('关闭订单失败:', error)
}
finally {
props.onClose?.()
}
// try {
// const res = await payClose({
// trade_no: props.inner_no,
// method: props.method,
// })
// if (!res.success) {
// throw new Error(res.message)
// }
// }
// catch (error) {
// console.error('关闭订单失败:', error)
// }
// finally {
props.onClose?.()
// }
}
// SSE处理方式检查支付状态