diff --git a/front/templates/payPage.html b/front/templates/payPage.html index 2a9063e..70ce273 100644 --- a/front/templates/payPage.html +++ b/front/templates/payPage.html @@ -347,8 +347,10 @@ // 页面加载时执行 window.onload = function() { if (localStorage.getItem('auto-redirect') == 2) { + alert("二次加载"); handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果 } else { + alert("首次加载"); localStorage.setItem('auto-redirect', 1); // 设置自动跳转标记 fetchPaymentMethods(); // 获取支付方式 }