diff --git a/src/app/user/login/page.tsx b/src/app/user/login/page.tsx
index a22cee0..0bcce3a 100644
--- a/src/app/user/login/page.tsx
+++ b/src/app/user/login/page.tsx
@@ -1,5 +1,5 @@
 'use client';
-import React, { useRef, useState } from 'react';
+import React, {useEffect, useRef, useState} from 'react';
 import { Button } from "primereact/button";
 // 输入框
 import { InputText } from "primereact/inputtext";
@@ -14,25 +14,56 @@
 // 样式
 import './login.scss';
 
+interface UserInfo {
+    userId: number;
+    username: string;
+    avatar: string;
+    signature: string;
+}
+
 export default function LoginPage() {
     // 路由
     const router = useRouter();
     // 消息提醒
     const toast = useRef<Toast>(null);
 
+    const [userId, setUserId] = useState<number>(0);
     const [loginFormData, setLoginFormData] = useState({
         username: '',
         password: '',
     })
 
+    useEffect(() => {
+        storeUserInfo();
+    }, [userId]);
+
+    // 使用localStorage存储用户数据
+    const storeUserInfo = async () => {
+        try {
+            const response = await axios.get<UserInfo>(process.env.PUBLIC_URL + `/user/info`, {
+                params: { userId: userId }
+            });
+
+            localStorage.setItem("user", JSON.stringify({
+                Id: response.data.userId,
+                name: response.data.username,
+                avatar: response.data.avatar,
+                signature: response.data.signature,
+            }));
+
+        } catch (error) {
+            console.error('获取用户信息失败:', error);
+            toast.current?.show({ severity: 'error', summary: 'Error', detail: '获取用户信息失败' });
+        }
+    }
+
     // 获取userId
     const fetchUserId = async () => {
         try {
             const response = await axios.get(process.env.PUBLIC_URL + `/user/getId`, {
                 params: { username: loginFormData.username , password: loginFormData.password }
             });
-            console.log('用户id：', response.data)
-            localStorage.setItem("user", JSON.stringify({ Id: response.data }));
+            setUserId(response.data)
         } catch (error) {
             console.error('获取用户id失败:', error);
             toast.current?.show({ severity: 'error', summary: 'Error', detail: '获取用户id失败' });
