From e21fb53fe5562796b194e819fe0c6bbd01ebfd2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Tue, 21 Oct 2025 20:16:23 +0800 Subject: [PATCH] =?UTF-8?q?home=E9=A1=B5=E5=85=BC=E5=AE=B9H5=EF=BC=8C?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E9=BB=98=E8=AE=A4=E8=B7=B3=E8=BD=AC/home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/users/oauth/callback/page.tsx | 4 ++-- components/FamousTemplate.tsx | 2 +- components/layout/H5TopBar.tsx | 4 ++-- components/layout/top-bar.tsx | 4 ++-- components/pages/home-page2.tsx | 2 +- components/pages/login.tsx | 2 +- docs/google-oauth-callback-flow-analysis.md | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/users/oauth/callback/page.tsx b/app/users/oauth/callback/page.tsx index fcb9b67..15cced2 100644 --- a/app/users/oauth/callback/page.tsx +++ b/app/users/oauth/callback/page.tsx @@ -176,11 +176,11 @@ export default function OAuthCallback() { localStorage.setItem('token', token); } - console.log('⏰ 准备在2秒后跳转到 /movies'); + console.log('⏰ 准备在2秒后跳转到 /home'); // 2秒后跳转到主页 setTimeout(() => { - const returnUrl = '/movies'; + const returnUrl = '/home'; console.log('🚀 开始跳转到:', returnUrl); window.location.href = returnUrl; }, 2000); diff --git a/components/FamousTemplate.tsx b/components/FamousTemplate.tsx index 59ef256..386cb9c 100644 --- a/components/FamousTemplate.tsx +++ b/components/FamousTemplate.tsx @@ -42,7 +42,7 @@ const FamousTemplate: React.FC = () => {

Hot Templates

-
+
{(["all", "music", "animation", "fantasy"] as const).map((tab) => (
@@ -523,7 +523,7 @@ export function TopBar({ collapsed, isDesktop=true }: { collapsed: boolean, isDe px-2 py-1.5 text-xs /* 平板及以上适配 */ sm:px-4 sm:py-2 sm:text-sm" - onClick={() => router.push("/movies")} + onClick={() => router.push("/home")} > Go Started
diff --git a/components/pages/home-page2.tsx b/components/pages/home-page2.tsx index 242e0f8..1d75fb8 100644 --- a/components/pages/home-page2.tsx +++ b/components/pages/home-page2.tsx @@ -382,7 +382,7 @@ function HomeModule1() { 2xl:w-[12rem] 2xl:h-[3.75rem] 2xl:text-xl" onClick={() => { if (localStorage.getItem("token")) { - router.push("/movies"); + router.push("/home"); } else { router.push("/login"); } diff --git a/components/pages/login.tsx b/components/pages/login.tsx index a1fa36c..924f9bf 100644 --- a/components/pages/login.tsx +++ b/components/pages/login.tsx @@ -133,7 +133,7 @@ export default function Login() { try { await loginUser(email, password); // 登录成功后跳转到首页 - router.push("/movies"); + router.push("/home"); } catch (error: any) { console.error("Login failed:", error); diff --git a/docs/google-oauth-callback-flow-analysis.md b/docs/google-oauth-callback-flow-analysis.md index 7fb6e6d..e027ffe 100644 --- a/docs/google-oauth-callback-flow-analysis.md +++ b/docs/google-oauth-callback-flow-analysis.md @@ -291,7 +291,7 @@ const handleOAuthCallback = async () => { // 2秒后跳转到主页 setTimeout(() => { - const returnUrl = '/movies' + const returnUrl = '/home' window.location.href = returnUrl }, 2000) } catch (error) {