From 61bc4672a9eb51f9fa3e24287f6584236dc4b635 Mon Sep 17 00:00:00 2001 From: ypsdf1 Date: Thu, 16 Jul 2026 13:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=AF=E4=BB=98=E9=94=81?= =?UTF-8?q?=E5=AE=9A:=20=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=8C=89=E9=92=AE=E5=85=81=E8=AE=B8=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E6=96=B0=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- player.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/player.php b/player.php index 3bda940..fa49127 100644 --- a/player.php +++ b/player.php @@ -1099,9 +1099,10 @@ if ($currentVersion !== $BUILD_VERSION) { const latest = res.data.orders[0]; localStorage.setItem('sdf1_last_recharge_no', latest.out_trade_no); if (latest.status === 'paid') { - st.innerHTML = '✅ 此订单已支付完成。'; + st.innerHTML = '✅ 此订单已支付完成,可以发起新订单。'; + localStorage.removeItem('sdf1_last_recharge_no'); const btn = document.getElementById('rechargeBtn'); - btn.disabled = true; btn.textContent = '✅ 支付完成'; btn.onclick = null; + btn.disabled = false; btn.textContent = '🅰️ 支付宝支付 ¥0.01'; btn.onclick = startRecharge; } else { st.innerHTML = '检测到订单 ' + latest.out_trade_no + ',正在确认到账…'; pollRechargeOrder(false); @@ -1129,12 +1130,12 @@ if ($currentVersion !== $BUILD_VERSION) { const st = document.getElementById('rechargeStatus'); const btn = document.getElementById('rechargeBtn'); if (res.data.status === 'paid') { - // 已支付:清除本地记录,锁定按钮 + // 已支付:清除本地记录,恢复按钮允许新订单 localStorage.removeItem('sdf1_last_recharge_no'); - st.innerHTML = '✅ 此订单已支付完成。'; - btn.disabled = true; - btn.textContent = '✅ 支付完成'; - btn.onclick = null; + st.innerHTML = '✅ 此订单已支付完成,可以发起新订单。'; + btn.disabled = false; + btn.textContent = '🅰️ 支付宝支付 ¥0.01'; + btn.onclick = startRecharge; } else if (res.data.status === 'created') { // 检查订单是否已过期(5分钟) const nowSec = Math.floor(Date.now() / 1000); @@ -1230,12 +1231,12 @@ if ($currentVersion !== $BUILD_VERSION) { const res = await api('pay.php', {action: 'query_order', out_trade_no: no}); if (res.success && res.data) { if (res.data.status === 'paid') { - st.innerHTML = '✅ 支付成功!游戏内债券发放中,请稍候刷新「余额查询」。'; + st.innerHTML = '✅ 支付成功!游戏内债券发放中,请稍候刷新「余额查询」。可以发起新订单。'; if (rechargePollTimer) { clearInterval(rechargePollTimer); rechargePollTimer = null; } - // 支付成功后清除本地记录 + 锁定按钮 + // 支付成功后清除本地记录 + 恢复按钮允许新订单 localStorage.removeItem('sdf1_last_recharge_no'); const btn = document.getElementById('rechargeBtn'); - if (btn) { btn.disabled = true; btn.textContent = '✅ 支付完成'; btn.onclick = null; } + if (btn) { btn.disabled = false; btn.textContent = '🅰️ 支付宝支付 ¥0.01'; btn.onclick = startRecharge; } } else { st.innerHTML = '⏳ 订单处理中(' + (res.message || '等待支付平台通知') + ')…'; }