+
@@ -177,6 +177,7 @@
// 处理支付回调
function handlePaymentCallback() {
const id = getQueryParam('no');
+ alert(id, 'id')
if (!id) return;
showLoading(); // 显示加载状态
@@ -344,9 +345,13 @@
// 页面加载时执行
window.onload = function() {
+ showLoading()
+ alert(1, 'zgp')
if (getQueryParam('return') == 'true' && !localStorage.getItem('auto-redirect')) {
+ alert(2, 'zgp')
handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果
} else {
+ alert(3, 'zgp')
localStorage.removeItem('auto-redirect'); // 清除可能的auto-redirect标记
fetchPaymentMethods(); // 获取支付方式
}