From e8f0e2efbe45e996fffbe3c5d9d6f2a41e494277 Mon Sep 17 00:00:00 2001 From: testadmin Date: Sun, 26 Apr 2026 20:37:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AlinPay=20=E5=85=85=E5=80=BC=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20iframe=20=E5=86=85=E5=B5=8C=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=B7=B3=E8=BD=AC=E5=A4=96=E9=93=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/recharge.vue | 63 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/pages/recharge.vue b/pages/recharge.vue index f7690e6..b422e72 100644 --- a/pages/recharge.vue +++ b/pages/recharge.vue @@ -236,6 +236,17 @@ + + + + + Thanh toán ngân hàng + × + + + + + @@ -362,6 +373,10 @@ export default { }, _bankPollTimer: null, _bankCountdownTimer: null, + alinPay: { + visible: false, + url: "", + }, }; }, computed: { @@ -510,13 +525,8 @@ export default { .then((res) => { const d = res.Data || {}; if (d.status == 1 && d.url) { - const o = navigator.userAgent; - const isiOS = !!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); - if (isiOS) { - window.location.href = d.url; - } else { - window.open(d.url, "_blank"); - } + this.alinPay.url = d.url; + this.alinPay.visible = true; } else { this.$toast({ message: d.message || '充值失败', @@ -643,6 +653,10 @@ export default { }, }); }, + closeAlinPay() { + this.alinPay.visible = false; + this.alinPay.url = ""; + }, closeEpayQr() { this.epayQr.visible = false; this.stopEpayTimers(); @@ -956,4 +970,39 @@ export default { margin-top: 14rpx; opacity: 0.85; } +.alin-overlay { + position: fixed; + top: 0; left: 0; right: 0; bottom: 0; + z-index: 9999; + background: rgba(0,0,0,0.6); + display: flex; + align-items: center; + justify-content: center; +} +.alin-pay-box { + width: 92vw; + height: 85vh; + background: #fff; + border-radius: 10px; + overflow: hidden; + display: flex; + flex-direction: column; +} +.alin-pay-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 15px; + background: #1a1a2e; +} +.alin-pay-title { + color: #f4c46f; + font-size: 16px; + font-weight: bold; +} +.alin-iframe { + flex: 1; + width: 100%; + border: none; +}