优化Profile.vue用户信息加载逻辑
This commit is contained in:
parent
8b599d2226
commit
c4ebdb4d71
@ -288,7 +288,8 @@ const passwordRules = {
|
||||
const loadUserInfo = async () => {
|
||||
try {
|
||||
const response = await getUserInfo()
|
||||
// getUserInfo返回的是Result<UserInfo>,需要访问data属性
|
||||
// request.get返回的是Result对象,需要访问data属性
|
||||
// response结构: { code: 200, data: UserInfo, message: '' }
|
||||
const data = response.data
|
||||
userInfo.value = data
|
||||
userForm.username = userInfo.value.username
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user