mod: 细节调整

This commit is contained in:
张传龙
2022-06-17 23:05:57 +08:00
parent ae43ffb94f
commit ef33b28492
2 changed files with 7 additions and 6 deletions

View File

@@ -38,10 +38,10 @@ export const useUserStore = defineStore('user', {
return Promise.reject(error)
}
},
logout() {
toLogin()
async logout() {
removeToken()
this.userInfo = {}
toLogin()
},
setUserInfo(userInfo = {}) {
this.userInfo = { ...this.userInfo, ...userInfo }