+ Terminal
+
+ From 0574b0cc20d94450dbe4b0619ecd6da938f16eb1 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 01:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E5=B1=82=E9=89=B4=E6=9D=83=E6=9E=B6?= =?UTF-8?q?=E6=9E=84=EF=BC=9A=E4=B8=AD=E9=97=B4=E4=BB=B6=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E9=97=A8=E6=8E=A7=20+=20=E8=90=BD=E5=9C=B0=E9=A1=B5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E7=9B=B4=E8=BF=9E=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LandingPage "进入产品"按钮改为 /auth/login?next=/terminal,消除未登录直达终端 再跳登录的视觉卡顿。Middleware 新增 handleTerminalGate(Layer 1), 在 /terminal 路由独立拦截未认证用户并 302 到登录页。 ScanTerminalDashboard 内 ProductAccessRequired 重构为 SubscriptionGate(Layer 2), 专注展示升级订阅提示。 Constraint: 双层顺序为认证优先 → 订阅检查在后 Tested: tsc --noEmit 通过, npm run build 通过 --- .../dashboard/ScanTerminalDashboard.tsx | 209 ++++++++++++++---- .../landing/InstitutionalLandingPage.tsx | 2 +- frontend/middleware.ts | 52 +++++ 3 files changed, 215 insertions(+), 48 deletions(-) diff --git a/frontend/components/dashboard/ScanTerminalDashboard.tsx b/frontend/components/dashboard/ScanTerminalDashboard.tsx index a63b11cf..3a9a2371 100644 --- a/frontend/components/dashboard/ScanTerminalDashboard.tsx +++ b/frontend/components/dashboard/ScanTerminalDashboard.tsx @@ -643,12 +643,111 @@ function KoyfinWeatherTerminal({ ); } -function ProductAccessRequired({ - isAuthenticated, +// ─── Layer 2: Authenticated but no active subscription ─────────────────────── +// Shown inside the terminal shell after middleware has confirmed the user is +// logged in (Layer 1). Presents a targeted upgrade prompt. +function SubscriptionGate({ isEn }: { isEn: boolean }) { + const features = isEn + ? [ + "Real-time METAR observations across 500+ stations", + "DEB forecast blends with 0–240h horizon", + "AI decision cards with Poly-score ranking", + "Historical backtesting & weather market signals", + ] + : [ + "500+ 气象站实时 METAR 实况", + "DEB 智能融合预测(0–240 小时)", + "AI 决策卡片 + Poly-score 排名", + "历史回测与天气市场交易信号", + ]; + + return ( +
+ {isEn + ? "Your account is verified. One step away from full access." + : "账号已验证,只差一步即可获得完整访问权限。"} +
++ {isEn + ? "Cancel anytime · No hidden fees · Instant access after payment" + : "随时取消 · 无隐藏费用 · 付款后立即解锁"} +
+- {isAuthenticated - ? isEn - ? "Your account is signed in, but the Koyfin-style weather terminal is locked until payment is active." - : "你已登录,但 Koyfin 风格天气交易终端会在付款生效后解锁。" - : isEn - ? "The landing page is public. The decision terminal is paid-only." - : "落地页公开展示;天气交易决策台仅向付费用户开放。"} +
+ {isEn + ? "The weather terminal is for verified subscribers only." + : "天气决策台仅对已验证的付费用户开放。"}
-
+ Terminal
+
+