From 85239e97f8798bf1a9720eb164c1ee69c2cdc04e Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 2 Mar 2026 01:05:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=97=B6=E5=89=8D=E7=AB=AF=E6=8F=90=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=9B=E4=BF=AE=E6=AD=A3=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=9B=BE=E6=A0=87=EF=BC=9Bbeta=20compose=20=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20Docker=20Hub=20=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.prod.yml | 2 +- src/app/pay/page.tsx | 15 +++++++++++++++ src/components/PaymentForm.tsx | 11 +++-------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 90e93f1..f3ca775 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,6 +1,6 @@ services: app: - image: sub2apipay:latest + image: touwaeriol/sub2apipay:${IMAGE_TAG:-latest} container_name: sub2apipay ports: - '8087:3000' diff --git a/src/app/pay/page.tsx b/src/app/pay/page.tsx index 2e5ce9d..763c156 100644 --- a/src/app/pay/page.tsx +++ b/src/app/pay/page.tsx @@ -59,6 +59,7 @@ function PayContent() { maxAmount: 1000, maxDailyAmount: 0, }); + const [userNotFound, setUserNotFound] = useState(false); const effectiveUserId = resolvedUserId || userId; const isEmbedded = uiMode === 'embedded' && isIframeContext; @@ -100,6 +101,9 @@ function PayContent() { methodLimits: cfgData.config.methodLimits, }); } + } else if (cfgRes.status === 404) { + setUserNotFound(true); + return; } // 有 token 时才尝试获取用户详情和订单 @@ -183,6 +187,17 @@ function PayContent() { ); } + if (userNotFound) { + return ( +
+
+

用户不存在

+

请检查链接是否正确,或联系管理员

+
+
+ ); + } + const buildScopedUrl = (path: string, forceOrdersTab = false) => { const params = new URLSearchParams(); if (effectiveUserId) params.set('user_id', String(effectiveUserId)); diff --git a/src/components/PaymentForm.tsx b/src/components/PaymentForm.tsx index 5d7a1f6..fac376d 100644 --- a/src/components/PaymentForm.tsx +++ b/src/components/PaymentForm.tsx @@ -94,14 +94,9 @@ export default function PaymentForm({ if (type === 'wxpay') { return ( - - + + + );