From eaed2d4a0b3ddf75a84eac48cd1b553ccea38bc5 Mon Sep 17 00:00:00 2001 From: zhangguoping Date: Mon, 21 Jul 2025 20:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20front/templates/payPage.ht?= =?UTF-8?q?ml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/templates/payPage.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/front/templates/payPage.html b/front/templates/payPage.html index 975a968..8f9fe40 100644 --- a/front/templates/payPage.html +++ b/front/templates/payPage.html @@ -59,7 +59,7 @@ flex-direction: column; align-items: center; justify-content: center; - height: 200px; + height: 100%; } .loading-spinner { @@ -139,7 +139,7 @@ -
+

支付处理中,请稍等...

@@ -214,9 +214,7 @@ // 获取支付方式列表 function fetchPaymentMethods() { - const id = getQueryParam('no'); - alert(id, 'zgp') if (id) { fetch(`/pay/front/api/v1/payPage/list?id=${id}`, { method: 'POST', @@ -235,9 +233,9 @@ } }) .then(data => { - closeLoading(); // 处理返回的数据,例如渲染支付方式列表 if (data === null || data.data.length === 0) { + closeLoading(); const pay = document.getElementById('pay'); pay.innerHTML = '

支付环境异常,请检查

'; } else if (data.data.length === 1) { @@ -249,6 +247,7 @@ } } else { // 多种支付方式,展示支付界面 + closeLoading(); renderPaymentMethods(data.data); } }) @@ -343,14 +342,16 @@ // 页面加载时执行 window.onload = function() { + alert(1) if (localStorage.getItem('auto-redirect') && localStorage.getItem('auto-redirect') == 2) { + alert(2) handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果 } else { + alert(3) localStorage.setItem('auto-redirect', 1); // 设置自动跳转标记 fetchPaymentMethods(); // 获取支付方式 } }; - {{ else}}