fix: 用户不存在时前端提示错误;修正微信支付图标;beta compose 改用 Docker Hub 镜像

This commit is contained in:
erio
2026-03-02 01:05:01 +08:00
parent c6815fc2a3
commit 85239e97f8
3 changed files with 19 additions and 9 deletions

View File

@@ -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 (
<div className={`flex min-h-screen items-center justify-center p-4 ${isDark ? 'bg-slate-950' : 'bg-slate-50'}`}>
<div className="text-center text-red-500">
<p className="text-lg font-medium"></p>
<p className="mt-2 text-sm text-gray-500"></p>
</div>
</div>
);
}
const buildScopedUrl = (path: string, forceOrdersTab = false) => {
const params = new URLSearchParams();
if (effectiveUserId) params.set('user_id', String(effectiveUserId));