improve: 用户信息展示

This commit is contained in:
From-wh 2023-02-24 17:59:30 +08:00
parent 1e3beb79f2
commit d549e4d504
2 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,7 @@ export default {
},
mounted() {
this.account = this.$store.state.userInfo.userInfo.account;
this.formValidate.real_name = this.$store.state.userInfo.userInfo.real_name;
},
methods: {
handleSubmit(name) {
@ -66,6 +67,7 @@ export default {
if (valid) {
updtaeAdmin(this.formValidate)
.then((res) => {
this.$store.commit('userInfo/userRealName', this.formValidate.real_name);
this.$Message.success(res.msg);
})
.catch((res) => {

View File

@ -56,6 +56,9 @@ export default {
userInfo(state, userInfo) {
state.userInfo = userInfo;
},
userRealName(state, realName) {
state.userInfo.real_name = realName;
},
uniqueAuth(state, uniqueAuth) {
state.uniqueAuth = uniqueAuth;
},