This commit is contained in:
plightfield 2024-11-08 19:51:42 +08:00
parent ed10c2b118
commit f7a99e7a65
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,6 @@ export default defineStore('user', () => {
if (!val) return if (!val) return
request<UserInfo>('GET', '/api/profile').then((res) => { request<UserInfo>('GET', '/api/profile').then((res) => {
Object.assign(profile, res) Object.assign(profile, res)
}) })
}, },
{ immediate: true } { immediate: true }
@ -41,6 +40,7 @@ export default defineStore('user', () => {
Object.assign(profile, { ...defaultUserInfo }) Object.assign(profile, { ...defaultUserInfo })
// profile.avatar = '' // profile.avatar = ''
} }
// 自动备份
return { return {
token, token,
profile, profile,