vuex统一命名风格

This commit is contained in:
sfmind
2022-05-02 16:53:56 +08:00
parent a54298bf25
commit 5efd621f21
4 changed files with 39 additions and 30 deletions

View File

@ -81,7 +81,7 @@ export default {
const tempFilePaths = chooseImageRes.tempFilePaths
updateAvatar(tempFilePaths[0]).then(res => {
this.userInfo.avatar = res.data
this.$store.commit('setUserInfo', this.userInfo)
this.$store.commit('SET_USER_INFO', this.userInfo)
})
}
})
@ -90,7 +90,7 @@ export default {
updateNickname({ nickname: this.tempName }).then(res => {
this.nameEditOn = false;
this.userInfo.nickname = this.tempName
this.$store.commit('setUserInfo', this.userInfo)
this.$store.commit('SET_USER_INFO', this.userInfo)
})
}
}