From bce8e3bf66c00ef6fb32f26c27c39b5ac3b4d47f Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期三, 16 四月 2025 08:59:01 +0800
Subject: [PATCH] 登录

---
 src/app/layout.tsx |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 8ad4198..6c02623 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -2,16 +2,33 @@
 import { Inter } from "next/font/google";
 import "./globals.css";
 import ClientLayoutContent from '@/components/layout/ClientLayoutContent';
+import Script from 'next/script';
+import { UserProvider } from "@/context/UserContext";
 
 const inter = Inter({ subsets: ["latin"] });
 
 export const metadata: Metadata = {
-  title: "甯峰箘鍚涙垚 - 鏁板瓧鍛樺伐骞冲彴",
-  description: "鏅鸿兘鐗╂祦瑙e喅鏂规",
+  title: "甯峰箘鍚涙垚 - AI鍦烘櫙妯℃嫙骞冲彴",
+  description: "鏅鸿兘鍖栦緵搴旈摼绠$悊锛孉I妯℃嫙APS鍦烘櫙鐨勯鑸��",
   icons: {
-    icon: '/logo.svg',
-    apple: '/logo.svg',
+    icon: '/images/favicon.ico',
+    shortcut: '/images/favicon.ico',
+    apple: '/images/favicon.ico',
   },
+};
+
+const ScrollToTop = () => {
+  return (
+    <Script id="scroll-to-top">
+      {`
+        if (typeof window !== 'undefined') {
+          window.onload = function() {
+            window.scrollTo(0, 0);
+          }
+        }
+      `}
+    </Script>
+  );
 };
 
 export default function RootLayout({
@@ -21,8 +38,11 @@
 }) {
   return (
     <html lang="zh-CN" className="smooth-scroll">
+      <ScrollToTop />
       <body className={`${inter.className} overflow-x-hidden`}>
-        <ClientLayoutContent>{children}</ClientLayoutContent>
+        <UserProvider>
+          <ClientLayoutContent>{children}</ClientLayoutContent>
+        </UserProvider>
       </body>
     </html>
   );

--
Gitblit v1.9.3