diff --git a/src/components/Subscription/SubscriptionContentNew.tsx b/src/components/Subscription/SubscriptionContentNew.tsx index d5fdf662..1d13a5ab 100644 --- a/src/components/Subscription/SubscriptionContentNew.tsx +++ b/src/components/Subscription/SubscriptionContentNew.tsx @@ -253,12 +253,12 @@ export default function SubscriptionContentNew() { const data = await response.json(); if (data.success) { setPaymentOrder(data.data); - setPaymentCountdown(300); - startAutoPaymentCheck(data.data.order_id); + setPaymentCountdown(30 * 60); // 30分钟 + startAutoPaymentCheck(data.data.id); toast({ - title: '订单已创建', - description: '请使用微信扫码支付', + title: '订单创建成功', + description: '请使用微信扫描二维码完成支付', status: 'success', duration: 3000, isClosable: true, @@ -1027,29 +1027,100 @@ export default function SubscriptionContentNew() { ) : ( - + 请使用微信扫描二维码完成支付 + + {/* 倒计时 */} + + + + + 二维码有效时间: {formatTime(paymentCountdown)} + + + + + + {/* 二维码 */} + + {paymentOrder.qr_code_url ? ( + 微信支付二维码 + ) : ( + + + + )} + + + {/* 订单信息 */} - - 剩余时间: {formatTime(paymentCountdown)} - - - + + 订单号: {paymentOrder.order_no} + + + 支付金额: + + ¥{paymentOrder.amount} + + + + + {/* 操作按钮 */} + + + )}