history问题

This commit is contained in:
zhangguoping 2026-01-16 17:53:39 +08:00
parent c95ee510b2
commit fbe115c095
1 changed files with 9 additions and 5 deletions

View File

@ -426,7 +426,7 @@
<h3 style="color: #28a745;">支付成功!</h3>
<p style="margin: 20px 0; font-size: 16px;">正在为您跳转...<span id="countdown">${Math.ceil(CONFIG.REDIRECT_DELAY / 1000)}</span></p>
<p style="color: #666; font-size: 14px;">如果没有自动跳转,请点击下方按钮</p>
<button onclick="window.location.href='${data.return_url}'" style="background-color: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; margin-top: 10px;">
<button onclick="window.location.replace('${data.return_url}')" style="background-color: #007bff; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; margin-top: 10px;">
立即跳转
</button>
</div>
@ -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 = "<h3>支付环境异常,请检查</h3>";
} 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();