history问题
This commit is contained in:
parent
c95ee510b2
commit
fbe115c095
|
|
@ -426,7 +426,7 @@
|
||||||
<h3 style="color: #28a745;">支付成功!</h3>
|
<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="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>
|
<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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -443,7 +443,8 @@
|
||||||
if (countdown <= 0) {
|
if (countdown <= 0) {
|
||||||
clearInterval(countdownInterval);
|
clearInterval(countdownInterval);
|
||||||
if (data.return_url) {
|
if (data.return_url) {
|
||||||
window.location.href = data.return_url;
|
// window.location.href = data.return_url;
|
||||||
|
window.location.replace(data.return_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
@ -452,7 +453,8 @@
|
||||||
if (data.return_url) {
|
if (data.return_url) {
|
||||||
// 设置自动跳转
|
// 设置自动跳转
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = data.return_url;
|
// window.location.href = data.return_url;
|
||||||
|
window.location.replace(data.return_url);
|
||||||
}, CONFIG.REDIRECT_DELAY);
|
}, CONFIG.REDIRECT_DELAY);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -508,7 +510,8 @@
|
||||||
pay.innerHTML = "<h3>支付环境异常,请检查</h3>";
|
pay.innerHTML = "<h3>支付环境异常,请检查</h3>";
|
||||||
} else if (data.data.length === 1) {
|
} 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 {
|
} else {
|
||||||
Utils.closeLoading();
|
Utils.closeLoading();
|
||||||
// 多种支付方式,展示支付界面
|
// 多种支付方式,展示支付界面
|
||||||
|
|
@ -598,7 +601,8 @@
|
||||||
Utils.showLoading();
|
Utils.showLoading();
|
||||||
// 尝试导航到支付页面,如果失败则显示错误
|
// 尝试导航到支付页面,如果失败则显示错误
|
||||||
try {
|
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(() => {
|
setTimeout(() => {
|
||||||
Utils.closeLoading();
|
Utils.closeLoading();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue