更新 front/templates/payPage.html
This commit is contained in:
parent
a527a44e20
commit
707c1d20c1
|
@ -124,7 +124,7 @@
|
|||
{{if eq .code 200 }}
|
||||
<body>
|
||||
<!-- 页面内容 -->
|
||||
<div class="payment-info" id="payment-info">
|
||||
<div class="payment-info" id="payment-info" style="display: none;">
|
||||
<h2>订单支付</h2>
|
||||
<p>{{.desc}}</p>
|
||||
<p>交易号:{{ .id }}</p>
|
||||
|
@ -132,14 +132,14 @@
|
|||
</div>
|
||||
|
||||
<!-- 支付方式选择区域 -->
|
||||
<div id="pay-container">
|
||||
<div id="pay-container" style="display: none;">
|
||||
<div id="pay"></div>
|
||||
<!-- 支付方式列表 -->
|
||||
<ul id="payment-list"></ul>
|
||||
</div>
|
||||
|
||||
<!-- Loading状态 -->
|
||||
<div id="loading" class="loading-container" style="display: none;">
|
||||
<div id="loading" class="loading-container">
|
||||
<div class="loading-spinner"></div>
|
||||
<p class="loading-text">支付处理中,请稍等...</p>
|
||||
</div>
|
||||
|
@ -177,6 +177,7 @@
|
|||
// 处理支付回调
|
||||
function handlePaymentCallback() {
|
||||
const id = getQueryParam('no');
|
||||
alert(id, 'id')
|
||||
if (!id) return;
|
||||
|
||||
showLoading(); // 显示加载状态
|
||||
|
@ -344,9 +345,13 @@
|
|||
|
||||
// 页面加载时执行
|
||||
window.onload = function() {
|
||||
showLoading()
|
||||
alert(1, 'zgp')
|
||||
if (getQueryParam('return') == 'true' && !localStorage.getItem('auto-redirect')) {
|
||||
alert(2, 'zgp')
|
||||
handlePaymentCallback(); // 如果是支付回调且不是自动跳转,处理支付结果
|
||||
} else {
|
||||
alert(3, 'zgp')
|
||||
localStorage.removeItem('auto-redirect'); // 清除可能的auto-redirect标记
|
||||
fetchPaymentMethods(); // 获取支付方式
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue