1c1dc6cf by joe

1

1 parent 19b1e147
import { mapState } from "vuex";
import api from '@/api/api'
import {
formdata,
......@@ -50,6 +52,9 @@ export default {
modalComp
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
locale() {
return this.$i18n.locale || 'tc';
},
......@@ -190,6 +195,11 @@ export default {
param.policies = policies;
httpPost({ url: api.updatePolicyInfo, data: param, sid: true }).then(res => {
if (this.isOwner && param.name) {
let userInfo = JSON.parse(JSON.stringify(this.userInfo));
userInfo.name = param.name;
this.$store.commit("SET_USER_INFO", userInfo);
}
this.loading = false;
this.showModal(this.i18n.policyChangeInformation.success);
}).catch(err => {
......
......@@ -223,9 +223,11 @@ export default {
message = this.i18n.infomationImprove.successMsg;
let path = this.$route.query.c || "/";
this.targetPath = path;
this.userInfo.hadFullInfo = 1;
this.userInfo.name = this.information.lastName + this.information.firstName;
this.$store.commit("SET_USER_INFO", this.userInfo);
let userInfo = JSON.parse(JSON.stringify(this.userInfo));
userInfo.hadFullInfo = 1;
userInfo.name = this.information.lastName + this.information.firstName;
this.$store.commit("SET_USER_INFO", userInfo);
// this.showModal(message, "succ");
this.modalCallback();
break;
......