diff --git a/front/templates/payPage.html b/front/templates/payPage.html index 5e4f044..7bab42c 100644 --- a/front/templates/payPage.html +++ b/front/templates/payPage.html @@ -426,7 +426,7 @@

支付成功!

正在为您跳转...${Math.ceil(CONFIG.REDIRECT_DELAY / 1000)}

如果没有自动跳转,请点击下方按钮

- @@ -443,7 +443,8 @@ if (countdown <= 0) { clearInterval(countdownInterval); if (data.return_url) { - window.location.href = data.return_url; + // window.location.href = data.return_url; + window.location.replace(data.return_url); } } }, 1000); @@ -452,7 +453,8 @@ if (data.return_url) { // 设置自动跳转 setTimeout(() => { - window.location.href = data.return_url; + // window.location.href = data.return_url; + window.location.replace(data.return_url); }, CONFIG.REDIRECT_DELAY); } }, @@ -508,7 +510,8 @@ pay.innerHTML = "

支付环境异常,请检查

"; } else if (data.data.length === 1) { // 只有一种支付方式,自动跳转 - window.location.href = `${CONFIG.API.SUBMIT}?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`; + // window.location.href = `${CONFIG.API.SUBMIT}?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`; + window.location.replace(`${CONFIG.API.SUBMIT}?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`); } else { Utils.closeLoading(); // 多种支付方式,展示支付界面 @@ -598,7 +601,8 @@ Utils.showLoading(); // 尝试导航到支付页面,如果失败则显示错误 try { - window.location.href = `${CONFIG.API.SUBMIT}?pay_channel_id=${selectedMethod.value}&no=${no}`; + // window.location.href = `${CONFIG.API.SUBMIT}?pay_channel_id=${selectedMethod.value}&no=${no}`; + window.location.replace(`${CONFIG.API.SUBMIT}?pay_channel_id=${selectedMethod.value}&no=${no}`); // 设置超时检查,如果长时间未跳转则显示错误 setTimeout(() => { Utils.closeLoading();