Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-07 11:02:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
598e34e8d0fe79a7adda495f4e52b1e42ed74ef0
598e34e8
1 parent
06e7fdef
feat(登录): 添加用户信息缓存到localStorage
在登录成功后,将用户信息缓存到localStorage以便后续使用
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
src/views/auth/LoginPage.vue
src/views/auth/LoginPage.vue
View file @
598e34e
...
...
@@ -285,6 +285,8 @@ const handleSubmit = async () => {
if (user_id && HTTP_USER_TOKEN) {
// 设置认证请求头
setAuthHeaders(user_id, HTTP_USER_TOKEN);
// 缓存user_info
localStorage.setItem('user_info', JSON.stringify(response?.data?.user_info || {}));
}
}
...
...
Please
register
or
login
to post a comment