diff --git a/front/templates/payPage.html b/front/templates/payPage.html
index 4b7cb57..f856031 100644
--- a/front/templates/payPage.html
+++ b/front/templates/payPage.html
@@ -243,8 +243,7 @@
if(localStorage.getItem('auto-redirect') != 2){
// 否则设置自动跳转标记,并跳转
localStorage.setItem('auto-redirect', 2);
- window.location.replace(`/pay/front/api/v1/payPage/submit?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`);
- // window.location.href = `/pay/front/api/v1/payPage/submit?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`;
+ window.location.href = `/pay/front/api/v1/payPage/submit?pay_channel_id=${data.data[0].pay_channel_id}&no=${id}`;
}
} else {
// 多种支付方式,展示支付界面
@@ -329,8 +328,7 @@
const no = getQueryParam('no');
const selectedMethod = document.querySelector('input[name="paymentMethod"]:checked');
if (selectedMethod) {
- window.location.replace(`/pay/front/api/v1/payPage/submit?pay_channel_id=${selectedMethod.value}&no=${no}`);
- // window.location.href = `/pay/front/api/v1/payPage/submit?pay_channel_id=${selectedMethod.value}&no=${no}`;
+ window.location.href = `/pay/front/api/v1/payPage/submit?pay_channel_id=${selectedMethod.value}&no=${no}`;
} else {
alert('请选择支付方式');
}
@@ -344,16 +342,15 @@
// 页面加载时执行
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}}