Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
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
2024-12-16 14:22:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8ed75fdb6918f6ee1dcfd00b9bb8a28c7ddb51e3
8ed75fdb
1 parent
f46fb318
🐞 fix(用户登录): 如果丢失token,我的信息页面需要重新登录
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
src/views/user/info.vue
src/views/user/info.vue
View file @
8ed75fd
<!--
* @Date: 2024-10-18 18:00:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-1
1 17:36:43
* @LastEditTime: 2024-12-1
6 14:21:04
* @FilePath: /hager/src/views/user/info.vue
* @Description: 文件描述
-->
...
...
@@ -87,6 +87,11 @@ export default {
async getUserInfo () {
const { code, data } = await getUserInfoAPI();
if (code === 1) { // 已登录
if (data === null) {
this.$router.push({
path: '/user/login',
})
}
this.email = data.email;
this.username = data.username;
this.tel = data.mobile;
...
...
@@ -95,6 +100,8 @@ export default {
}
},
onHandle () {
// 获取用户信息
this.getUserInfo();
this.status = 'edit';
},
async onSubmit () {
...
...
Please
register
or
login
to post a comment